News for hackers. Stuff that matters.
Re:A Radical Approach to Computation with Real Numbers [pdf] by Veedrac on Saturday April 02, 2016 @07:13PM (#11414033)
I meant in computational resource terms, on hardware. It's obviously a pain to actually write.

> The values don't need to be cached

I don't see how addition could be implemented in a semi-reasonable amount of time without table lookup, nor does it seem to be mentioned.

Re:A Radical Approach to Computation with Real Numbers [pdf] by dnautics on Saturday April 02, 2016 @07:15PM (#11414040)
floating point multiplications expend considerable resources... 64-bit mult on x86 is 3 cycles, IIRC.
Re:A Radical Approach to Computation with Real Numbers [pdf] by stephencanon on Saturday April 02, 2016 @10:57PM (#11414709)
5 cycles latency, but two multiplications can issue every cycle. The throughput is actually greater than what's available for integer multiplication.
Re:A Radical Approach to Computation with Real Numbers [pdf] by Veedrac on Saturday April 02, 2016 @07:33PM (#11414110)
Ergo "multiplication is reasonable" rather than "very fast". 3 cycles doesn't seem like a ton to me (searching suggests it's actually 5, but that's still not a ton for a 64 bit multiply IMO).
Re:A Radical Approach to Computation with Real Numbers [pdf] by trsohmers on Saturday April 02, 2016 @08:17PM (#11414238)
Other than mathematical correctness, which was why John started working on unums, one of the coolest things about "Unums 2.0" as shown in this presentation is that all four arithmetic operations (add, subtract, multiply, divide) can take the same time. The 64 bit IEEE FPU my company is developing is able to do add and subtract in a single cycle, a multiply or fused multiply add in 3 cycles, and a divide in 17 cycles... all of which are pretty much the fastest reasonable implementations you can get.

To give you an idea of actual time to do those things, doing an add takes around 300 picoseconds, while the multiply is around 3,000 picoseconds. An order of magnitude increase in time to do an operation is a lot when it comes to hardware complexity (and thus associated area and power cost).

Re:A Radical Approach to Computation with Real Numbers [pdf] by Veedrac on Sunday April 03, 2016 @02:54AM (#11415214)
But, like I said, if big lookup tables work for Unums, they should also work for floats.
Re:A Radical Approach to Computation with Real Numbers [pdf] by userbinator on Saturday April 02, 2016 @09:57PM (#11414566)
To put things into perspective, on the 8087 floating-point multiplication was over 100 cycles (and divisions 200+). We've come a long way since then.
Re:A Radical Approach to Computation with Real Numbers [pdf] by pklausler on Saturday April 02, 2016 @09:07PM (#11414420)
IIRC, add is 3 on Haswell, mult and fma are 5. But I'm too lazy to look it up.