Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29282 Discussions

XE 13 format statment prints negative zero

Pramod_V_
Beginner
729 Views

We are upgrading Intel Fortran compiler from 11.1.072 to XE 2013 U2.

In testing, we found out that 2013 is printing negative zero in some instances where the number that is being printed is a very small negative number.

For example:

Program main
implicit none
real float
float = -0.00005
write (*,1000) float
1000 format(F5.3)
End Program

Compiler 11.1.072 prints 0.000 where as the new XE 2013 U2 prints -.000

I was looking for a compiler switch to print the old answer without modifying the code, but couldn't find any.

Did anyone experience the same? 

Thanks for your help,
- Pramod

0 Kudos
1 Reply
Steven_L_Intel1
Employee
729 Views

This is required by the Fortran standard. The old behavior was incorrect. There is no option to revert to the old, buggy behavior.

0 Kudos
Reply