RosettaCodeData/Task/Real-constants-and-functions/Common-Lisp/real-constants-and-functions.lisp
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

10 lines
513 B
Common Lisp

(exp 1) ; e (Euler's number)
pi ; pi constant
(sqrt x) ; square root: works for negative reals and complex
(log x) ; natural logarithm: works for negative reals and complex
(log x 10) ; logarithm base 10
(exp x) ; exponential
(abs x) ; absolute value: result exact if input exact: (abs -1/3) -> 1/3.
(floor x) ; floor: restricted to real, two valued (second value gives residue)
(ceiling x) ; ceiling: restricted to real, two valued (second value gives residue)
(expt x y) ; power