Utils
Utilize utility functions for various mathematical operations.
Utility functions are indispensable for a wide range of general-purpose tasks. Calcul.io offers functions for random number generation, rounding, absolute values, and more. These functions are essential for programming, data analysis, and everyday calculations.
Our utility functions provide the flexibility and convenience needed for various mathematical tasks. Whether you are generating random data, performing simple arithmetic, or rounding numbers to the desired precision, Calcul.io offers the utility tools necessary to streamline your workflow and achieve accurate results.
bin | Format a number as binary |
clone | Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices |
format | Format a value of any type as string. |
hasNumericValue | Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value. |
hex | Format a number as hexadecimal |
isInteger | Test whether a value is an integer number. |
isNaN | Test whether a value is NaN (not a number) |
isNegative | Test whether a value is negative: smaller than zero. |
isNumeric | Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean. |
isPositive | Test whether a value is positive: larger than zero. |
isPrime | Test whether a value is prime: has no divisors other than itself and one. |
isZero | Test whether a value is zero. |
numeric | Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction. |
oct | Format a number as octal |
Interpolate values into a string template. | |
typeOf | Get the type of a variable. |