v / vlib / math
Raw file | 12 loc (9 sloc) | 192 bytes | Latest commit hash 1cfc4198f
1module math
2
3fn JS.Math.exp(x f64) f64
4
5// exp calculates exponent of the number (math.pow(math.E, x)).
6[inline]
7pub fn exp(x f64) f64 {
8 mut res := 0.0
9 #res.val = Math.exp(x)
10
11 return res
12}