diff --git a/src/forms.rs b/src/forms.rs index a42dda7f7..3a2b743f2 100644 --- a/src/forms.rs +++ b/src/forms.rs @@ -744,7 +744,11 @@ impl Number { Number::Float(f) => Number::Float(OrderedFloat(f.signum())), _ => { if self.is_positive() { - Number::Fixnum(Fixnum::build_with(1)) + if self.is_zero() { + Number::Fixnum(Fixnum::build_with(0)) + } else { + Number::Fixnum(Fixnum::build_with(1)) + } } else if self.is_negative() { Number::Fixnum(Fixnum::build_with(-1)) } else {