8 changes: 8 additions & 0 deletions libc/utils/MPFRWrapper/MPFRUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ class MPFRNumber {
return result;
}

MPFRNumber sinh() const {
MPFRNumber result(*this);
mpfr_sinh(result.value, value, mpfr_rounding);
return result;
}

MPFRNumber sqrt() const {
MPFRNumber result(*this);
mpfr_sqrt(result.value, value, mpfr_rounding);
Expand Down Expand Up @@ -515,6 +521,8 @@ unary_operation(Operation op, InputType input, unsigned int precision,
return mpfrInput.round();
case Operation::Sin:
return mpfrInput.sin();
case Operation::Sinh:
return mpfrInput.sinh();
case Operation::Sqrt:
return mpfrInput.sqrt();
case Operation::Tan:
Expand Down
1 change: 1 addition & 0 deletions libc/utils/MPFRWrapper/MPFRUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ enum class Operation : int {
ModPIOver4,
Round,
Sin,
Sinh,
Sqrt,
Tan,
Trunc,
Expand Down