C++ Logo

std-proposals

Advanced search

Re: Reserve good keywords for floating point types

From: Lyberta <lyberta_at_[hidden]>
Date: Tue, 15 Oct 2019 15:34:00 +0000
Tony V E:
> I do projection mapping. (Stitch together the output of N x M projectors
> into a single image canvas.
> https://www.google.com/search?q=projection+mapping&tbm=isch)
>
> Doing all our calculations using doubles gives us more accuracy than your
> eye can detect, float probably does as well actually.
> We don't care about the format, we care that it is fast (even that doesn't
> matter much, since you run the calculations once, then run the "light show"
> for days or weeks based on the one calculation - if nothing moves!)
>
> Before projection mapping, I've used floating point extensively for 25
> years without caring about format. Maybe I misunderstand what you are
> saying?
>

I do game development and audio.

In game engines it is crucial that make sure clients and server are
synchronized correctly. Most of the floating point data sent over the
network are positions and velocities of objects. If there is
disagreement on bit layout, clients will see all the world around them
teleporting wildly.

On Linux audio, JACK is the sound server and other programs act as
clients. JACK defines that audio is in binary32 format in native
endianness. If there is disagreement in bit layout, the garbage audio
data can permanently damage DAC equipment and human ears.


Received on 2019-10-15 10:37:16