unageek / inari

A Rust implementation of interval arithmetic (IEEE 1788)
MIT License
32 stars 2 forks source link

Expose directed rounding functions? #61

Closed Chris00 closed 2 years ago

Chris00 commented 2 years ago

In a project, I need to implement the function image Clearly I cannot do it naively because the singularity of the logarithm at 0. To that aim, directed rounding methods (such as x.add_ru(y), x.mul_rd(y),...) would be useful. Of course I can always make a singleton with each boundary point by I would be making twice as many computations (and half would be thrown away). What do you think?

unageek commented 2 years ago

I'm not sure about how you are going to use add_ru, etc., but if you want to experiment with them, you can git clone inari locally, and change inari = "0.x" to inari = { path = "/path/to/inari" } in your project's Cargo.toml (please check Specifying path dependencies.) Then, you will be able to expose any functions from inari.