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

12 lines
345 B
D

import std.math ; // need to import this module
E // Euler's number
PI // pi constant
sqrt(x) // square root
log(x) // natural logarithm
log10(x) // logarithm base 10
log2(x) // logarithm base 2
exp(x) // exponential
abs(x) // absolute value (= magnitude for complex)
floor(x) // floor
ceil(x) // ceiling
pow(x,y) // power