subtract
Subtract two numbers to find the difference. Provide the first and second numbers to get the result.
Instructions
Perform subtraction of two numbers provided in the data object.
Args:
data (TwoNumberOperation): An object containing two numbers, a and b.
Returns:
Dict[str, Any]: A dictionary containing the operation name ("subtract")
and the result of the subtraction if successful, or an error message
if an exception occurs.
Logs:
Logs the subtraction operation and its result in the format:
"SUB | {data.a} - {data.b} = {result}".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||