[ANN] ExtremeFloats.jl: Floats with extended range of exponents

ExtremeFloats.jl is a new package that allows you to perform floating point operations with a very large range of exponents. Float64 offers 11 bits for the exponent, ExtremeFloat gives you 64 bits. This is especially useful for exponentiation and logarithms of large positive and negative numbers.

It is a registered package and can be used via ]add ExtremeFloats. See the GitHub page for details. Using it is as easy as

using ExtremeFloats

x = ExtremeFloat(2.71828)
y = ExtremeFloat(-10_000)

result = 2x + exp(y)/x
as_float64 = Float64(result)

This package was created out of necessity during work on my master thesis and is therefore quite limited in its capabilities, at the moment – I only implemented what I needed. But maybe it is still helpful for those who feel limited by the orders of magnitude other high-precision libraries allow for or by the excessive dynamic memory allocations of arbitrary-precision libraries.

8 Likes

You could include ULogFloat64 from https://github.com/cjdoris/LogarithmicNumbers.jl in your benchmarks.

4 Likes