D at 20: Hits and Misses, and what I learned along the way Oct 19
Ethan
gooberman at gmail.com
Sun Oct 20 15:41:10 UTC 2019
On Friday, 18 October 2019 at 01:37:01 UTC, Walter Bright wrote:
> Slides: https://digitalmars.com/articles/hits.pdf
Tangent time.
In regards to floating point:
> Unable to convince people that more precision is worthwhile
I'm actually waiting for quad floats to have hardware support.
Registers are already wide enough, just nothing internally or in
terms of instruction set for them yet.
But yeah. The reality is that the hardware I operate on uses
32-bit floats almost exclusively on the CPU (the sole exception I
can think of is the main simulation timer, you don't want that as
a 32-bit float). GPUs and shaders use 16-bit half floats
extensively these days. But 64-bit is a rarity because operations
take 40% more execution time on average with my own tests and we
can forsake the accuracy for execution time.
This might change in a 4K TV world. Haven't really done too much
with them yet (despite Quantum Break supporting 4K, but I didn't
really notice anything glitchy that I could associate with
floating point imprecision).
Still. 64- and 128-bit floats are quite useful for offline
calculations. Make your data as accurate as possible, then let
the runtime code use the fastest execution path it can.
More information about the Digitalmars-d-announce
mailing list