# ieeeck

Checks if the infinity and NaN arithmetic is safe. Called by ilaenv.

## Syntax

ival = ieeeck( ispec, zero, one )

## Description

The function ieeeck is called from ilaenv to verify that infinity and possibly NaN arithmetic is safe, that is, will not trap.

## Input Parameters

ispec

  INTEGER.

  Specifies whether to test just for inifinity arithmetic or both for infinity and NaN arithmetic:

  If `ispec = 0`: Verify infinity arithmetic only.

  If `ispec = 1`: Verify infinity and NaN arithmetic.

zero

  REAL. Must contain the value 0.0

  This is passed to prevent the compiler from optimizing away this code.

one

  REAL. Must contain the value 1.0

  This is passed to prevent the compiler from optimizing away this code.

## Output Parameters

ival

  INTEGER.

  If `ival = 0`: Arithmetic failed to produce the correct answers.

  If `ival = 1`: Arithmetic produced the correct answers.

Parent topic: Utility Functions and Routines