Skip to content

Commit c546970

Browse files
committed
Address comments.
1 parent 7501ad1 commit c546970

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libc/src/__support/FPUtil/ManipulationFunctions.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ intlogb(U x) {
115115
exponent < IntLogbConstants<T>::T_MIN)) {
116116
set_errno_if_required(ERANGE);
117117
raise_except_if_required(FE_INVALID);
118-
return exponent ? IntLogbConstants<T>::T_MAX : IntLogbConstants<T>::T_MIN;
118+
return exponent > 0 ? IntLogbConstants<T>::T_MAX
119+
: IntLogbConstants<T>::T_MIN;
119120
}
120121

121122
return static_cast<T>(exponent);

0 commit comments

Comments
 (0)