Bug in math/ceil

2
closed
CatchemAL
CatchemAL
Posted 2 months ago

Bug in math/ceil #423

Issue ceil function is only accurate to 1dp. For cases where n < num < n + 0.05, it will incorrectly round down.

Demonstrating the issue

    #[test]
    fn positive_decimal() {
        let num = 3.01;
        assert_eq!(ceil(num), num.ceil());
    }
github-actions[bot]
github-actions[bot]
Created 1 month ago

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

siriak
siriak
Created 1 month ago

Fixed, thanks!