Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29075 Discussions

How to disable minus sign for zero value

pierangelo
Beginner
433 Views

using the IFORT compiler the option 'Floating point' 'Enable IEEE Minus Zero Support' 'No' works correctly: only the value 0.0 is allowed
Using the IFX compiler it seems that the indicated option does not work in fact in the code I also have the value -0.0 and the test a.ne.0. gives the result .false. when a = -0.0

0 Kudos
1 Reply
andrew_4619
Honored Contributor III
425 Views

try /assume:nominus0 compiler option but the testing a real to equal zero is not robust code, you need a tolerance.

0 Kudos
Reply