Real constants and functions: Difference between revisions

Added power
(New page: {{task}}Show how to use the following math constants and functions in your language (if not available, note it): *e (Euler's number) *pi *square root *logarithm (any base allowed) *exponen...)
 
(Added power)
Line 8:
*floor (largest integer less than this number--not the same as truncate or int)
*ceiling (smallest integer greater than this number--not the same as round up)
*power (x<sup>y</sup>)
 
=={{header|BASIC}}==
Line 15 ⟶ 16:
exp(x) 'exponential
log(x) 'natural logarithm
x ^ y 'power
'floor, ceiling, e, and pi not available</qbasic>
 
Line 26 ⟶ 28:
Math.abs(x); //absolute value
Math.floor(x); //floor
Math.ceil(x); //ceiling</java>
Math.pow(x,y) //power</java>
Anonymous user