Skip to content

suggest ldexp() for x*2^y #328

@berthubert

Description

@berthubert

Hi,

Thank you for Herbie, I think this will be very useful, if only to educate people that even double precision floating point is not magic!

In many contexts of Global Navigation Satellite Systems (GNSS), it is common to get parameters as integers which then need to be multiplied by 2^-47, for example. It turns out that IEEE 754 can do such multiplications natively on the exponent, and for this reason, POSIX provides a primitive called ldexp(x, y) where the result is x * 2^y, both for positive and negative y.

Using it enhances precision and speed, so it might be worthwhile to add it to Herbie.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions