Skip to content

Commit

Permalink
Fix experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Jan 22, 2025
1 parent 2d971e6 commit f56c40f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/math/generic/ceil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ pub fn ceil<F: Float>(x: F) -> F {

// Otherwise, raise an inexact exception.
force_eval!(x + F::MAX);
if x.is_sign_negative() {
if x.is_sign_positive() {
ix += m;
}
ix &= !m;
} else {
// No integer part, raise an inexact exception since truncation will happen.
force_eval!(x + F::MAX);

if x.is_sign_positive() {
if x.is_sign_negative() {
return F::NEG_ZERO;
} else if ix << 1 != zero {
return F::ONE;
Expand Down

0 comments on commit f56c40f

Please sign in to comment.