Skip to content

Dividing RBig by an IBig or UBig may reuslt in a zero denominatorΒ #55

@robbert-vdh

Description

@robbert-vdh

I haven't checked where and why this may be happening, but some interactions between RBig and IBig/UBig result in zero denominators, causing some further operations to panic. For example:

>> rbig!(10) / ibig!(10)
1 / 0
>> rbig!(10) / ubig!(10)
1 / 0
>> Rational::from((Rational::simplest_from_f64(123.456).unwrap() * ibig!(10)).round()) / ibig!(10)
247 / 0

This doesn't happen with Relaxed, which leads me to assume it's something to do with the simplification. Tested with dashu 0.4.2 from crates.io.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions