## Arithmetic

Perform basic arithmetic operations with ease and accuracy.

Arithmetic functions form the foundation of all mathematical computations. Calcul.io provides a comprehensive set of arithmetic functions including addition, subtraction, multiplication, division, and modulus. These basic operations are crucial for everyday calculations and advanced mathematical problems alike.

In addition to basic arithmetic, Calcul.io supports more complex operations such as exponentiation, roots, and logarithms. Our platform ensures accuracy and reliability in all arithmetic computations, making it a trusted tool for students, professionals, and enthusiasts seeking precise mathematical solutions.

abs | Compute the absolute value. |

cbrt | Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned |

ceil | Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity. |

cube | Compute the cube of a value. The cube of x is x * x * x. |

exp | Calculate the exponent of a value. |

expm | Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation. |

expm1 | Calculate the value of subtracting 1 from the exponential value. |

fix | Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero. |

floor | Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity. |

gcd | Compute the greatest common divisor. |

hypot | Calculate the hypotenusa of a list with values. |

invmod | Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax ≣ 1 (mod b) |

lcm | Compute the least common multiple. |

log | Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base). |

log10 | Compute the 10-base logarithm of a value. |

log1p | Calculate the logarithm of a `value+1` |

log2 | Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`. |

norm | Calculate the norm of a number, vector or matrix. |

nthRoot | Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A". |

nthRoots | Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values. |

round | round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals. |

sign | Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0. |

sqrt | Compute the square root value. If x = y * y, then y is the square root of x. |

sqrtm | Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`. |

square | Compute the square of a value. The square of x is x * x. |

xgcd | Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b. |