C++ Logo


Advanced search

Re: Reserve good keywords for floating point types

From: Tony V E <tvaneerd_at_[hidden]>
Date: Tue, 15 Oct 2019 12:12:15 -0400
On Tue, Oct 15, 2019 at 11:35 AM Lyberta via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> 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.

Yes, obviously there are cases where format matters. They tend to be when
communicating to other devices/computers.
I need to give the correct format to my projectors. But that's 1% of my
code, not 99%.

Be seeing you,

Received on 2019-10-15 11:14:42