FOR_CHECK_FLAWED_PENTIUM

Run-Time Function: Checks the processor to determine if it shows characteristics of the Pentium® floating-point divide flaw.

This routine can be called from a C program. It is invoked by default from a Fortran program unless /check:noflawed_pentium is specified.

Module: USE DFLIB

Syntax

result = FOR_CHECK_FLAWED_PENTIUM( )

Results:

If the floating-point divide flaw is found, a severe forrtl error message is displayed and the calling program is terminated.

You can bypass this action by setting environment variable FOR_RUN_FLAWED_PENTIUM to the value TRUE.

For more information, see Intel Pentium Floating-Point Flaw in the Programmer's Guide.

Example

Consider the following C code:

  void __stdcall for_check_flawed_pentium ( void );
  for_check_flawed_pentium ( );

Consider the following Fortran code that checks for the divide flaw:

  USE DFLIB

  REAL*8 X, Y, Z

  X = 5244795.0
  Y = 3932159.0
  Z = X - (X/Y) * Y
  IF (Z .NE. 0) THEN           ! If flawed, Z will be 256
    PRINT *, " FDIV flaw detected on Pentium"
  ENDIF