[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

fp_iop_snan, fp_iop_infsinf, fp_iop_infdinf, fp_iop_zrdzr, fp_iop_infmzr, fp_iop_invcmp, fp_iop_sqrt, fp_iop_convert, or fp_iop_vxsoft Subroutines

Purpose

Tests to see if a floating-point exception has occurred.

Library

Standard C Library (libc.a)

Syntax

#include <float.h>
#include <fpxcp.h>

int fp_iop_snan() 
int fp_iop_infsinf()

int 
fp_iop_infdinf()
int fp_iop_zrdzr()

int 
fp_iop_infmzr() 
int fp_iop_invcmp()

int 
fp_iop_sqrt() 
int fp_iop_convert()

int 
fp_iop_vxsoft ();

Description

These subroutines aid in determining when an exception has occurred and the exception type. These subroutines can be called explicitly after blocks of code that may cause a floating-point exception.

Return Values

The fp_iop_snan subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to a signaling NaN (NaNS) flag. Otherwise, a value of 0 is returned.

The fp_iop_infsinf subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to an INF-INF flag. Otherwise, a value of 0 is returned.

The fp_iop_infdinf subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to an INF/INF flag. Otherwise, a value of 0 is returned.

The fp_iop_zrdzr subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to a 0.0/0.0 flag. Otherwise, a value of 0 is returned.

The fp_iop_infmzr subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to an INF*0.0 flag. Otherwise, a value of 0 is returned.

The fp_iop_invcmp subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to a compare involving a NaN. Otherwise, a value of 0 is returned.

The fp_iop_sqrt subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to the calculation of a square root of a negative number. Otherwise, a value of 0 is returned.

The fp_iop_convert subroutine returns a value of 1 if a floating-point invalid-operation exception status flag is set due to the conversion of a floating-point number to an integer, where the floating-point number was a NaN, an INF, or was outside the range of the integer. Otherwise, a value of 0 is returned.

The fp_iop_vxsoft subroutine returns a value of 1 if the VXSOFT detail bit is on. Otherwise, a value of 0 is returned.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]