Jump to content

Real constants and functions: Difference between revisions

→‎{{header|Perl}}: Added examples and reformatted a bit
(add E example)
(→‎{{header|Perl}}: Added examples and reformatted a bit)
Line 183:
<perl>use POSIX;
 
sqrtexp(x1); #square roote
4 * atan2(1, 1); # pi
log(x); #natural logarithm
expsqrt($x); #exponential square root
log($x); # natural logarithm
abs(x); #absolute value
exp($x); # exponential
POSIX::floor(x); #floor
abs($x); # absolute value
POSIX::ceil(x); #ceiling
POSIX::floor($x); # floor
x ** y; #power</perl>
POSIX::ceil($x); # ceiling
$x ** $y; # power</perl>
 
=={{header|PHP}}==
845

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.