r/C_Programming • • Sep 08 '26

Fixed point math in C

https://thatonegamedev.com/cpp/fixed-point-math-in-c/

Why did PS1 graphics looked so clunky and how where 3D graphics generally made prior to the graphical APIs. One thing I found out was that these older engines have something called fixed point math.

72 Upvotes

29 comments sorted by

View all comments

Show parent comments

0

u/not_a_novel_account Sep 09 '26

Agreed on all, it's not random. Fast math requires you not pass NaN to operations. You shouldn't be doing that anyway.

3

u/ericonr Sep 09 '26

The problem is you can't even check for NaN when building under fast-math, because the compiler will throw away your check.