Task

Show how to use the following math constants and functions in your language   (if not available, note it):

   e   (base of the natural logarithm)
   



π


{\displaystyle \pi }


   square root
   logarithm   (any base allowed)
   exponential   (ex )
   absolute value   (a.k.a. "magnitude")
   floor   (largest integer less than or equal to this number--not the same as truncate or int)
   ceiling   (smallest integer not less than this number--not the same as round up)
   power   (xy )


Related task

   Trigonometric Functions


defmodule Real_constants_and_functions do
  def main do
    IO.puts :math.exp(1)                # e
    IO.puts :math.pi                    # pi
    IO.puts :math.sqrt(16)              # square root
    IO.puts :math.log(10)               # natural logarithm
    IO.puts :math.log10(10)             # base 10 logarithm
    IO.puts :math.exp(2)                # e raised to the power of x
    IO.puts abs(-2.24)                  # absolute value
    IO.puts Float.floor(3.1423)         # floor
    IO.puts Float.ceil(20.125)          # ceiling
    IO.puts :math.pow(3,2)              # exponentiation
  end
end
 
Real_constants_and_functions.main