Compute Natural Exponential
Examples
Filter
console.log(Math.exp(0));
// expected output: 1
console.log(Math.exp(1));
// expected output: 2.718281828459 (approximately)
console.log(Math.exp(-1));
// expected output: 0.36787944117144233
console.log(Math.exp(2));
// expected output: 7.38905609893065
Math.exp(-1); // 0.36787944117144233
Math.exp(0); // 1
Math.exp(1); // 2.718281828459045
package main
import (
"fmt"
"math"
)
func main() {
fmt.Printf("%.2f", math.Exp(10))
}