multiply
Calculate the product of two numbers by passing them in a data object. Get the exact numeric result for your arithmetic operations.
Instructions
Perform multiplication of two numbers provided in the data object.
Args:
data (TwoNumberOperation): An object containing two numbers a and b
to be multiplied.
Returns:
Dict[str, Any]: A dictionary containing the result of the multiplication
operation or an error message in case of failure.
Logs:
Logs the multiplication operation in the format:
"MUL | {data.a} * {data.b} = {result}"
Exceptions:
Catches any exceptions that occur during the operation and returns an
error response with the exception message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||