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


window 1
 
text ,,,,, 60// set tab width
 
print @"exp:",   exp(1)
print @"pi:",    pi
print @"sqr:",   sqr(2)
print @"log:",   log(2)
print @"log2:",  log2(2)
print @"log10",  log10(2)
print @"abs:",   abs(-2)
print @"floor:", int(1.534)
print @"ceil:",  val( using"###"; 1.534 )
print @"power:", 1.23 ^ 4
 
HandleEvents