square
Calculate the square of a number by multiplying it by itself. Returns the squared result for use in mathematical computations.
Instructions
Calculate the square of a given number. Args: data (SingleNumberOperation): An object containing the number to be squared. Returns: Dict[str, Any]: A dictionary containing the operation name ("square") and the result of squaring the input number. In case of an error, returns an error response. Logs: Logs the operation and the result in the format "SQUARE | ^2 = ". Raises: Exception: If an error occurs during the calculation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||