English
Math
About 229 wordsLess than 1 minute
2026-01-09
Math
Math Type
Summary
Math - Methods related to mathematical calculations
Static methods of Math type:
- BigDecimal.sqrt: Square root
- BigDecimal.abs: Absolute value
- BigDecimal.max: Returns the greater of two values
- BigDecimal.min: Returns the lesser of two values
- BigDecimal.ceil: Round up
- BigDecimal.floor: Round down
- BigDecimal.round: Round to nearest integer
Example:
log.info(Math.sqrt(16)) // Square root
log.info(Math.abs(-1)) // Absolute value
log.info(Math.max(10,16)) // Returns the greater of two values
log.info(Math.min(10,16)) // Returns the lesser of two values
log.info(Math.ceil(7.5 as double)) // Round up
log.info(Math.floor(7.9 as double)) // Round down
log.info(Math.round(7.5 as double)) // Round to nearest integer
```text
## Changelog
| Version | Date | Changes | Author |
| --- | --- | --- | --- |
| v1.0 | 2026-05-20 | Initial version | |
## Background
This document provides detailed information about the Math API functionality and usage, helping developers integrate relevant capabilities.
## Applicable Scenarios
Specific applicable scenarios are determined by actual business needs. Developers can select the appropriate API for integration as required.
## Prerequisites
- Access to Fxiaoke Open Platform
- Application authorization and configuration completed
- Basic knowledge of relevant business domain
## Steps
Please refer to the detailed instructions for each API.
## Notes
- Ensure prerequisites are met before calling APIs
- Pay attention to API call frequency limits
- Refer to error code documentation for exception handling
> **Compatibility:** This version currently has no deprecated or compatibility notes.