MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / number

Method number

src/compute-engine/index.ts:1835–1848  ·  view source on GitHub ↗

* This function tries to avoid creating a boxed number if `num` corresponds * to a common value for which we have a shared instance (-1, 0, NaN, etc...)

(
    value:
      | number
      | bigint
      | string
      | NumericValue
      | MathJsonNumberObject
      | BigDecimal
      | Complex
      | Rational,
    options?: { metadata: Metadata; canonical: CanonicalOptions }
  )

Source from the content-addressed store, hash-verified

1833 * - `sqrt()` (square root)
1834 * - `cbrt()` (cube root)
1835 * - `exp()` (e^x)
1836 * - `log()`
1837 * - `ln()` (natural logarithm)
1838 * - `mod()`
1839
1840 * - `abs()`
1841 * - `ceil()`
1842 * - `floor()`
1843 * - `round()`
1844
1845 * - `equals()`
1846 * - `gt()`
1847 * - `gte()`
1848 * - `lt()`
1849 * - `lte()`
1850 *
1851 * - `cos()`

Callers 3

ceBaselineFunction · 0.95
ceBaselineNFunction · 0.95
tupleMethod · 0.95

Calls 1

createNumberExpressionFunction · 0.90

Tested by 2

ceBaselineFunction · 0.76
ceBaselineNFunction · 0.76