top | item 27373349

(no title)

lbussell | 4 years ago

What about a 2-tuple with two numbers, one being the BigInt and one being the exponent. So 1.000054 would be (1000054, -6) = 1000054*10^(-6).

Yours is probably more space efficient though.

discuss

order

nine_k|4 years ago

This is basically floating-point.

IEEE 754, BTW, allows for 10-based floats, but IDK if anybody uses it.

wizzwizz4|4 years ago

Yours is more space-efficient for real-world numbers.