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


PROGRAM R_C_F
 
FUNCTION CEILING(X)
   CEILING=INT(X)-(X-INT(X)>0)
END FUNCTION
 
FUNCTION FLOOR(X)
   FLOOR=INT(X)
END FUNCTION
 
BEGIN
     PRINT(EXP(1))           ! e  not available
     PRINT(π)                ! pi is available or ....
     PRINT(4*ATN(1))         ! .... equal to
 
     X=12.345
     Y=1.23
 
     PRINT(SQR(X),X^0.5)     ! square root
     PRINT(LOG(X))           ! natural logarithm base e
     PRINT(LOG(X)/LOG(10))   ! base 10 logarithm
     PRINT(LOG(X)/LOG(Y))    ! arbitrary base logarithm (y>0)
     PRINT(EXP(X))           ! exponential
     PRINT(ABS(X))           ! absolute value
     PRINT(FLOOR(X))         ! floor
     PRINT(CEILING(X))       ! ceiling
     PRINT(X^Y)              ! power
END PROGRAM