From 8f1a6bdd75706f9250d2eab8741c92ea3e94a43a Mon Sep 17 00:00:00 2001 From: paxcut <53811119+paxcut@users.noreply.github.com> Date: Mon, 17 Apr 2023 13:19:47 -0700 Subject: [PATCH] includes/std: Added std::math::exp(), fixed std::math::ln comment (#106) Removed extraneous argument base to ln function and added the necessary definition in include file to access previously builtin function exp. --- includes/std/math.pat | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/std/math.pat b/includes/std/math.pat index e6492c5..f50e196 100644 --- a/includes/std/math.pat +++ b/includes/std/math.pat @@ -178,7 +178,6 @@ namespace std::math { /** Calculates the natural logarithm of `value`. @param value Value - @param base Base @return Logarithm of `value` with base `e` */ fn ln(auto value) { return builtin::std::math::ln(value); }; @@ -198,6 +197,13 @@ namespace std::math { */ fn pow(auto base, auto exp) { return builtin::std::math::pow(base, exp); }; + /** + Calculates the value of the natural number `e` raised to the power of `value`. + @param value Exponent + @return `e` raised to the power of `value` + */ + fn exp(auto value) { return builtin::std::math::exp(value); }; + /** Calculates the square root of `value`. @param value Value