back

by jjmarr·1y ago·view on hn ↗
Arbitrary precision sounds good but my registers have 64 bits and it takes several instructions to load arbitrary bit slices from memory.

It's a lot more performant to use the equivalent of scientific notation.

1 comments
Sure, but the vast majority of the time that performance difference doesn't matter, or at least isn't worth the large sacrifices in usability and consistency that it costs.
The vast majority of the time floats are a significantly more convenient representation, with more than enough precision for the job, and alternatives are so slow that they are somewhere between painful and literally impossible to use. Arbitrary precision computation grows exponentially more expensive as you perform arithmetic operations on it, and people routinely apply transcendental functions whose results cannot be represented using a finite number of binary digits.

If you are finding otherwise in your personal work, you are likely in some niche field sheltered far from the bulk of numerical computing applications.