Obviously for any 32 bit value there’s only 2^32 possible values. So logically, a better number format is all about the distribution of values and reducing redundancy. It sounds like the basic idea here is that rather than a fixed amount of significant figures, you get more precision in the middle. Meanwhile, you can also get larger exponents. Is that right?
John Gustafson’s crusade to replace floating point with something better
51–60 of 201 posts
Re: John Gustafson’s crusade to replace floating point with something better
#52What? Surely it does not have infinite precision with a finite number of bits, and also doesn't seem to be a rational number representation.
Re: John Gustafson’s crusade to replace floating point with something better
#53The paper for this was published in 2017[0] [0] https://dl.acm.org/citation.cfm?id=3148220
It's odd. Someone told me about that on irc at the Time. People were feeling strongly about the topic. Quackery, mythomany,.. nobody wanted to hear about anything but IEEE standards.
Mostly because there is no good evidence that what is being proposed is better.
This isn't the olden days when it was difficult to demonstrate on a large enough CPU and dataset. Today we have cloud computing. If you create something better, you can demonstrate it by putting it into a numerics application and blow everybody away.
The CFD people are always looking for better solutions. The numerical simulation people are always constrained.
Until you do that, people have a right to blow you off.
Re: John Gustafson’s crusade to replace floating point with something better
#54How does the implementation of an FPU for this compare? I thought the existing IEEE 754 floating point standard was focused on reduced complexity of addition and multiplication hardware. This seems more complicated.
having implemented it, with unoptimized verilog (ok, i wrote a verilog generator to generate it), it requires about 30% fewer LUTs on a FPGA relative to berkeley hardfloat implementation.
Re: John Gustafson’s crusade to replace floating point with something better
#55Earlier quoted context omitted.
Yes and no. 1. Yes -- On old x86 systems, the x87 registers were 80-bits and the bottom bits were undefined. You could theoretically have a 1-bit difference on some results depending on what the bottom 26 bits (that were undefined, because you had 64-bit floats most of the time, even though the machine did things 80-bits at a time). 2. No -- Modern x86 systems use SSE registers, which are 64-bits. There are a whole s…
In case you're like me, reading this comment and thinking "how the heck is 1 plus 1 plus 2-ish like 90 gazillion?", it's: >>> (1+1)+2.0**53 9007199254740994.0 >>> 1+(1+2.0**53) 9007199254740992.0 The exponent operator (double star) got transformed into italics apparently.
The newlines also helped, by the way, because I was wondering what putting the two numbers next to each other was meant to indicate.
Re: John Gustafson’s crusade to replace floating point with something better
#56Here is the official site[1] of the project. There is a request[2] to add it in the Scryer Prolog[3] (ISO Prolog implementation in Rust). And implementations in Rust[4] itself, and Julia[5] language. [1] https://posithub.org/index [2] https://github.com/mthom/scryer-prolog/issues/6 [3] https://github.com/mthom/scryer-prolog [4] https://gitlab.com/burrbull/softposit-rs [5] https://juliacomputing.com/blog/2016/03/29/un…
That's great, but if the hardware doesn't support it, then wouldn't the implementation would be slow?
Re: John Gustafson’s crusade to replace floating point with something better
#57Earlier quoted context omitted.
Nothing in between the assignment and the check changed the value of x or y What was the check for?
There was code in between that could have changed the value, but it was never triggered in the bug case.
Re: John Gustafson’s crusade to replace floating point with something better
#58Earlier quoted context omitted.
UNIX timestamps are normally stored as 32-bit or 64-bit signed integers, not as floating-point. If you want better than 1-second precision, then the type "struct timespec" (specified by POSIX) gives you nanosecond precision. Fixed-point types can also be used in languages that support them.
I thought unsigned in 64 bits, holding the number of nanoseconds since the Unix 0 time (which might be 1970, but i forget).
gettimeofday() and clock_gettime() provide higher resolution timestamps (respectively µs and ns), using typedefs instead of just numbers.
Some APIs return floating-point UNIX time in order to provide sub-second accuracy (the decimal part is the fractional second). Python's time.time() does that for instance.
Re: John Gustafson’s crusade to replace floating point with something better
#59"(even the same computation on the same system can produce different results for floats)" wait...what? Is this real?
Yes and no. 1. Yes -- On old x86 systems, the x87 registers were 80-bits and the bottom bits were undefined. You could theoretically have a 1-bit difference on some results depending on what the bottom 26 bits (that were undefined, because you had 64-bit floats most of the time, even though the machine did things 80-bits at a time). 2. No -- Modern x86 systems use SSE registers, which are 64-bits. There are a whole s…
Re: John Gustafson’s crusade to replace floating point with something better
#60Earlier quoted context omitted.
Yes and no. 1. Yes -- On old x86 systems, the x87 registers were 80-bits and the bottom bits were undefined. You could theoretically have a 1-bit difference on some results depending on what the bottom 26 bits (that were undefined, because you had 64-bit floats most of the time, even though the machine did things 80-bits at a time). 2. No -- Modern x86 systems use SSE registers, which are 64-bits. There are a whole s…
> Modern x86 systems use SSE registers Are your sure of this? It's my understanding that SSE registers require the use of a special API and standard floating point operations do not use them. But the last time I worked with them was writing a SIMD vector library 7 years ago.
No, SSE registers are used by most compilers that do floating point these days. They support all the usual IEEE float math operations and a host of bit twiddling operations as well as vector operations. The vector operations do still require using compiler intrinsics in C++, although some autovectorization does occur in gcc, icc, and llvm.