gcd
Calculate the greatest common divisor of two integers. Get the largest number that divides both inputs without a remainder.
Instructions
Calculate the Greatest Common Divisor (GCD) of two numbers.
Args:
data (TwoNumberOperation): An object containing two numbers, a and b.
Returns:
Dict[str, Any]: A dictionary containing the operation result or an error message.
Raises:
ValueError: If inputs are not integers.
Notes:
- Both numbers must be integers.
- Returns the largest number that divides both inputs.
- Logs the operation and result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||