Math Functions
Tulpar provides a comprehensive math library with 27 built-in functions.
Basic Operations
Section titled “Basic Operations”abs(x) // Absolute valuesqrt(x) // Square rootcbrt(x) // Cube rootpow(x, y) // Power (x^y)hypot(x, y) // HypotenuseRounding
Section titled “Rounding”floor(x) // Round downceil(x) // Round upround(x) // Round to nearesttrunc(x) // Truncate decimalTrigonometry
Section titled “Trigonometry”sin(x), cos(x), tan(x) // Basic trigasin(x), acos(x), atan(x) // Inverse trigatan2(y, x) // Two-argument arctansinh(x), cosh(x), tanh(x) // HyperbolicLogarithms and Exponentials
Section titled “Logarithms and Exponentials”exp(x) // e^xlog(x) // Natural log (ln)log10(x) // Base-10 loglog2(x) // Base-2 logStatistics and Random
Section titled “Statistics and Random”min(a, b, ...) // Minimum valuemax(a, b, ...) // Maximum valuerandom() // Random float [0,1)randint(a, b) // Random int [a,b]