Documentation
¶
Overview ¶
Package calculator provides exact arithmetic without executing code.
Index ¶
Constants ¶
View Source
const ToolNameCalculate = "calculate"
Variables ¶
This section is empty.
Functions ¶
func CreateToolSet ¶
CreateToolSet is used by the tools registry.
Types ¶
type Result ¶
type Result struct {
Result string `json:"result" jsonschema:"Exact answer as a decimal or, for non-terminating decimals, a reduced fraction"`
Decimal string `json:"decimal" jsonschema:"Decimal answer; non-terminating decimals are rounded to 20 decimal places"`
Approximate bool `json:"approximate" jsonschema:"True only when the decimal field is rounded; result is always exact"`
}
Click to show internal directories.
Click to hide internal directories.