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


(scl 12)  # 12 places after decimal point
(load "@lib/math.l")
 
(prinl (format (exp 1.0) *Scl))        # e, exp
(prinl (format pi *Scl))               # pi
 
(prinl (format (pow 2.0 0.5) *Scl))    # sqare root
(prinl (format (sqrt 2.0 1.0) *Scl))
 
(prinl (format (log 2.0) *Scl))        # logarithm
(prinl (format (exp 4.0) *Scl))        # exponential
 
(prinl (format (abs -7.2) *Scl))       # absolute value
(prinl (abs -123))
 
(prinl (format (pow 3.0 4.0) *Scl))    # power