Real constants and functions: Difference between revisions

Content added Content deleted
m (Added link to trig functions...combine?)
(added ocaml)
Line 31: Line 31:
Math.floor(x); //floor
Math.floor(x); //floor
Math.ceil(x); //ceiling
Math.ceil(x); //ceiling
Math.pow(x,y) //power</java>
Math.pow(x,y); //power</java>

=={{header|OCaml}}==
Unless otherwise noted, the following functions are for floats only:
<ocaml>sqrt x;; (* square root *)
log x;; (* natural logarithm--log base 10 also available (log10) *)
exp x;; (* exponential *)
abs_float x;; (* absolute value *)
abs x;; (* absolute value (for integers) *)
floor x;; (* floor *)
ceil x;; (* ceiling *)
x ** y; (* power *)</ocaml>