stencillogic / astro-float

Arbitrary precision floating point numbers library
MIT License
101 stars 4 forks source link

Fix `exp(-inf)` being negative infinity #19

Closed benjamin-cates closed 11 months ago

benjamin-cates commented 11 months ago

exp(neg inf) should actually be zero.

Is this the proper way to create an instance of zero (like a global const or something). I just copied how I saw 1 being created somewhere else in the file.

benjamin-cates commented 11 months ago

Oh I now see that some other boundary conditions are written as BigFloat::new(1). Is this a better way to construct it or is it slower?

stencillogic commented 11 months ago

Thanks for pointing to this. Good catch!

stencillogic commented 11 months ago

Closing as done.