We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7c6d12 commit c09dce9Copy full SHA for c09dce9
libc/src/__support/math/expf.h
@@ -112,6 +112,9 @@ LIBC_INLINE static constexpr float expf(float x) {
112
// Directional rounding version of expf.
113
LIBC_INLINE static float expf(float x, int rounding_mode) {
114
int current_rounding_mode = fputil::get_round();
115
+ if (rounding_mode == current_rounding_mode)
116
+ return expf(x);
117
+
118
fputil::set_round(rounding_mode);
119
float result = expf(x);
120
fputil::set_round(current_rounding_mode);
0 commit comments