diff options
author | Siva Chandra Reddy <sivachandra@google.com> | 2020-04-27 11:32:11 -0700 |
---|---|---|
committer | Siva Chandra Reddy <sivachandra@google.com> | 2020-05-15 12:43:03 -0700 |
commit | 96d85726b0fc3c5154265cea156483a3f63ebe21 (patch) | |
tree | 164d2ec7f0381cfad84c205c4c138ec28360197c /libc/utils | |
parent | 0d5d5a75e21fea2154fab87cafb76024bf3858e6 (diff) | |
download | llvm-96d85726b0fc3c5154265cea156483a3f63ebe21.zip llvm-96d85726b0fc3c5154265cea156483a3f63ebe21.tar.gz llvm-96d85726b0fc3c5154265cea156483a3f63ebe21.tar.bz2 |
[libc] Move implementations of expf and exp2f from the AOR to src/math.
Reviewers: phosek
Differential Revision: https://reviews.llvm.org/D79149
Diffstat (limited to 'libc/utils')
-rw-r--r-- | libc/utils/MPFRWrapper/MPFRUtils.cpp | 6 | ||||
-rw-r--r-- | libc/utils/MPFRWrapper/MPFRUtils.h | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/libc/utils/MPFRWrapper/MPFRUtils.cpp b/libc/utils/MPFRWrapper/MPFRUtils.cpp index fe84c38..74c2f76 100644 --- a/libc/utils/MPFRWrapper/MPFRUtils.cpp +++ b/libc/utils/MPFRWrapper/MPFRUtils.cpp @@ -95,6 +95,12 @@ public: case OP_Sin: mpfr_sin(value, mpfrInput.value, MPFR_RNDN); break; + case OP_Exp: + mpfr_exp(value, mpfrInput.value, MPFR_RNDN); + break; + case OP_Exp2: + mpfr_exp2(value, mpfrInput.value, MPFR_RNDN); + break; } } diff --git a/libc/utils/MPFRWrapper/MPFRUtils.h b/libc/utils/MPFRWrapper/MPFRUtils.h index f94a146..f6660f2 100644 --- a/libc/utils/MPFRWrapper/MPFRUtils.h +++ b/libc/utils/MPFRWrapper/MPFRUtils.h @@ -39,11 +39,7 @@ struct Tolerance { uint32_t bits; }; -enum Operation { - OP_Abs, - OP_Cos, - OP_Sin, -}; +enum Operation { OP_Abs, OP_Cos, OP_Sin, OP_Exp, OP_Exp2 }; namespace internal { |