Skip to content

More Calculations

TIPD edited this page Sep 22, 2022 · 1 revision

More Calculations

1 + 1 isn't the only thing it can do. It can do more!

Arithmetic

Addition

The same thing as before. Calcium("8 + 123")

Subtraction

Calcium("1000 - 500")

Division

Calcium("50 / 10")

Multiplication

Calcium("10 * 10")

Exponentiation

Syntax: b^a

Example:

Calcium("2^3")

Square Root

Right now, you have to use the root symbol to do this.

Calcium("√25")

Output: 5

Large Numbers

There are 2 large numbers available in Calcium.

  • googol
  • googolplex

Example:

Calcium("2 * googol + googolplex")

Mathematical Constants

There are many mathematical constants available in Calcium:

  • pi (π, pi)
  • Euler's Number (e)
  • Golden Ratio (φ)
  • Glaisher - Kinkelin Constant (A)
  • Khinchin Constant (k)
  • Euler - Mascheroni Constant (γ)
  • Conway Constant (λ)
  • Feigenbaum Constants (α, δ)
  • Apery Constant (ζ)

Example:

Calcium("2 * π + φ / γ")

Floating-Point Numbers

Calcium also supports Floating-Point Numbers!

Example: Calcium("2.1 * 3.52341231231")

Calculus

Logarithm

Calcium("log(20)")

Natural Logarithm

Calcium("ln(e)")

Clone this wiki locally