C++ SSE and SSE2 compiler settings, and their Floating Point effects.

Joined
May 31, 2022
Messages
6
Reaction score
0
I have been running C++ floating point tests using the Twilight Dragon Media C++ compiler for 64 bit Windows 10.

https://jmeubank.github.io/tdm-gcc/

C++ starts by using IEEE 754 equation for floats and doubles, decimal and hexadecimal values, floating point arithmetic, if I have things right. See this at:

https://introcs.cs.princeton.edu/java/91float/

I have learned that when you compile in
Code:
A)
float a = 0.1F;

what you get is stored is
0.100000001490116119384765625

whereas when you compile in
Code:
B)
double b = 0.1D;

what you get stored is
0.1000000000000000055511151231257827021181583404541015625

Most of your floating point operators are these:

+, -, *, /, %, ++n, --n, n++, n--, +=, -=, *=, /=, %=

Is there a GNU C++ switch that will turn off all of these floating point overflow and underflow values, both for assignment of the floating point data and arithmetic operator calculation for separate floating point data, too? How can this be acheived without adjusting the floating point source code at all?
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top