1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/math/log.c.v
2021-08-23 00:35:28 +03:00

26 lines
444 B
V

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)
}