dnsl48 / fraction

[Rust] Lossless fractions and decimals; drop-in float replacement
Apache License 2.0
83 stars 25 forks source link

Fixed floor, ceil and round for negative GenericFractions #82

Closed morri2 closed 1 year ago

morri2 commented 1 year ago

Fixes the problem where floor, ceil functions round negative GenericFractions the wrong way. Also fixed docs for round to accuratly describe its behaviour with rounding negative half-way cases, and be consistent with how floats are rounded. fixes #81

dnsl48 commented 1 year ago

Hi @morri2, thank you for the contribution! Indeed, this is a bug with the negative numbers.