NAG Library Routine Document

x07aaf  (is_finite)

 Contents

    1  Purpose
    7  Accuracy

1
Purpose

x07aaf determines whether a floating-point number is finite.

2
Specification

Fortran Interface
Function x07aaf ( x)
Logical:: x07aaf
Real (Kind=nag_wp), Intent (In):: x
C Header Interface
#include nagmk26.h
Nag_Boolean  x07aaf_ ( const double *x)

3
Description

x07aaf returns .TRUE. if and only if x is finite, and returns .FALSE. otherwise.

4
References

IEEE (2008) Standard for Floating-Point Arithmetic IEEE Standard 754-2008 IEEE, New York.

5
Arguments

1:     x – Real (Kind=nag_wp)Input
On entry: the number whose status is to be determined.

6
Error Indicators and Warnings

None.

7
Accuracy

Not applicable.

8
Parallelism and Performance

x07aaf is not threaded in any implementation.

9
Further Comments

This routine will return .FALSE. if the argument x is either infinite or a NaN (Not A Number).

10
Example

This program creates various infinities, NaNs and normal numbers and distinguishes between them.

10.1
Program Text

Program Text (x07aafe.f90)

10.2
Program Data

None.

10.3
Program Results

Program Results (x07aafe.r)

© The Numerical Algorithms Group Ltd, Oxford, UK. 2017