Remix.run Logo
Aardwolf 2 days ago

Personally I'm disappointed 128-bit floating point (quadruple precision) never properly made it into CPU's (sure it appeared in some niche ones here and there, but not in what we actually use today). After all, in the 1980's they had 80-bit ones, it's not even that far off, and they had millions times less transistors then.

While probably niche and applications that need higher precision using their own custom types anyway, they'd allow cool stuff like easy to program fractals with much higher detail than now. But also, less precision loss in many applications.

flohofwoe 2 days ago | parent | next [-]

That's the thing, bigger datatypes means less effective memory throughput. From that perspective 16-bit or even 8-bit floats are often more useful than 80 or 128 bit floats. Same problem with 64 bit pointers and why it's often better to store narrower indices instead of full pointers, data can be packed more tightly and accessed more efficiently.

TheOtherHobbes 2 days ago | parent [-]

The point about large word lengths is you get higher data throughput, and faster processing, because everything is going through fat pipes into a big parallel machine with multiple levels of cache and vectorisation.

The issue is the utility of floats at different precisions. 128-bit floats have some benefits for high-end scientific applications, but the extra cost and complexity over 64-bit hardware would only make sense for specialised scientific supercomputing. So far it just hasn't been worth it.

silvestrov 2 days ago | parent | prev | next [-]

precision loss in floating point is often exponential.

If 64 bit isn't enough, then very quickly 128 is also not enough.

If precision is important then you will very often want systems that represent every number as an interval [a, b] meaning that the true value is between those 2 numbers. This makes you able to detect loss of precision due to e.g. d = a / (b - c) where b-c can result in a number close to zero which makes uncertainty grow. If you use this formula iteratively then precision is lost completely no matter how many bits there are in your floating point variables.

anttihaapala 2 days ago | parent | prev | next [-]

The problem is for most practical uses where you need fast calculations the 64 bit precision is enough. For example there is hardly any physical calculation that would need more precision. 64 bit float can be used to measure the Earth-Sun distance to 30 micrometre precision. 128 bits does not just add anything generally useful. For monetary calculations you should be using decimals instead of binary anyway.

fsh 2 days ago | parent | next [-]

Doubles are precise to 1E-16, and the most precisely known fundamental constants have uncertainties on the 1E-12 level. This does not give a comfortable headroom, so the CODATA adjustment that determines the constants from measurements uses quadruple-precision numbers in FORTRAN.

AlotOfReading 2 days ago | parent | prev [-]

Quads make it feasible to write correctly rounded double functions. You can almost do the same things with double-double, but the result is slower and implementing most of the standard functions remains a bit of an open problem.

glimshe 2 days ago | parent | prev [-]

In most cases where I needed higher precision, I just went to fixed point... There are also free libraries with arbitrary precision (although at a significant performance hit).