blob: f2f8c9397e3c5b50f16897ec1a6e37223d42bef9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
module math
fn C.log(x f64) f64
fn C.log2(x f64) f64
fn C.log10(x f64) f64
// log calculates natural (base-e) logarithm of the provided value.
[inline]
pub fn log(x f64) f64 {
return C.log(x)
}
// log2 calculates base-2 logarithm of the provided value.
[inline]
pub fn log2(x f64) f64 {
return C.log2(x)
}
// log10 calculates the common (base-10) logarithm of the provided value.
[inline]
pub fn log10(x f64) f64 {
return C.log10(x)
}
|