RosettaCodeData/Task/Real-constants-and-functions/Perl/real-constants-and-functions.pl
2023-07-01 13:44:08 -04:00

17 lines
362 B
Raku

use POSIX; # for floor() and ceil()
exp(1); # e
4 * atan2(1, 1); # pi
sqrt($x); # square root
log($x); # natural logarithm; log10() available in POSIX module
exp($x); # exponential
abs($x); # absolute value
floor($x); # floor
ceil($x); # ceiling
$x ** $y; # power
use Math::Trig;
pi; # alternate way to get pi
use Math::Complex;
pi; # alternate way to get pi