Real constants and functions: Difference between revisions
→{{header|Perl}}: Added examples and reformatted a bit
(add E example) |
Underscore (talk | contribs) (→{{header|Perl}}: Added examples and reformatted a bit) |
||
Line 183:
<perl>use POSIX;
4 * atan2(1, 1); # pi
log(x); #natural logarithm▼
▲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
=={{header|PHP}}==
|