mirror of
https://github.com/intel/llvm.git
synced 2026-02-07 07:39:11 +08:00
[libc][math] Added atanf function.
Performance by core-math (core-math/glibc 2.31/current llvm-14): 28.879/20.843/20.15 Differential Revision: https://reviews.llvm.org/D132842
This commit is contained in:
@@ -182,6 +182,12 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
MPFRNumber atan() const {
|
||||
MPFRNumber result(*this);
|
||||
mpfr_atan(result.value, value, mpfr_rounding);
|
||||
return result;
|
||||
}
|
||||
|
||||
MPFRNumber atanh() const {
|
||||
MPFRNumber result(*this);
|
||||
mpfr_atanh(result.value, value, mpfr_rounding);
|
||||
@@ -506,6 +512,8 @@ unary_operation(Operation op, InputType input, unsigned int precision,
|
||||
switch (op) {
|
||||
case Operation::Abs:
|
||||
return mpfrInput.abs();
|
||||
case Operation::Atan:
|
||||
return mpfrInput.atan();
|
||||
case Operation::Atanh:
|
||||
return mpfrInput.atanh();
|
||||
case Operation::Ceil:
|
||||
|
||||
Reference in New Issue
Block a user