Jump to content

Real constants and functions: Difference between revisions

added haskell
(added c)
(added haskell)
Line 22:
 
=={{header|C}}==
Most of the following functions take a double; for each of them there are corresponding ones with "f" or "l" appended to the name that take a float or long double, respectively.
<c>#include <math.h>
 
Line 35:
ceil(x); /* ceiling */
pow(x,y); /* power */</c>
 
=={{header|Haskell}}==
<pre>
pi --pi
sqrt x --square root
log x --natural logarithm
exp x --exponential
abs x --absolute value
floor x --floor
ceiling x --ceiling
x ** y --power (floating-point exponentiation)
x ^ y --power (integer exponentiation)
</pre>
 
=={{header|Java}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.