You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If we overflow, return `x`, as the number of digits to the right of the decimal is too small (i.e., `x` is too large / lacks sufficient fractional precision) for there to be any effect when rounding...
137
142
if ( n<STDLIB_CONSTANT_FLOAT64_MIN_BASE10_EXPONENT ){
138
143
s=pow( 10.0, -( n+STDLIB_CONSTANT_FLOAT64_MAX_BASE10_EXPONENT ) ); // TODO: replace use of `pow` once have stdlib equivalent
139
-
y= ( x*HUGE ) *s; // order of operation matters!
144
+
y= ( x*HUGE_VALUE ) *s; // order of operation matters!
140
145
if ( stdlib_base_is_infinite( y ) ){
141
146
returnx;
142
147
}
143
-
return ( round( y ) / HUGE ) / s;// TODO: replace with stdlib round function once implemented
148
+
return ( stdlib_base_round( y ) / HUGE_VALUE ) / s;
144
149
}
145
150
s=pow( 10.0, -n ); // TODO: replace use of `pow` once have stdlib equivalent
146
151
y=x*s;
147
152
if ( stdlib_base_is_infinite( y ) ){
148
153
returnx;
149
154
}
150
-
returnround( y ) / s;// TODO: replace with stdlib round function once implemented
0 commit comments