3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download IEEECK + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ieeeck.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ieeeck.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ieeeck.f">
21 * INTEGER FUNCTION IEEECK( ISPEC, ZERO, ONE )
23 * .. Scalar Arguments ..
34 *> IEEECK is called from the ILAENV to verify that Infinity and
35 *> possibly NaN arithmetic is safe (i.e. will not trap).
44 *> Specifies whether to test just for inifinity arithmetic
45 *> or whether to test for infinity and NaN arithmetic.
46 *> = 0: Verify infinity arithmetic only.
47 *> = 1: Verify infinity and NaN arithmetic.
53 *> Must contain the value 0.0
54 *> This is passed to prevent the compiler from optimizing
61 *> Must contain the value 1.0
62 *> This is passed to prevent the compiler from optimizing
65 *> RETURN VALUE: INTEGER
66 *> = 0: Arithmetic failed to produce the correct answers
67 *> = 1: Arithmetic produced the correct answers
73 *> \author Univ. of Tennessee
74 *> \author Univ. of California Berkeley
75 *> \author Univ. of Colorado Denver
78 *> \date November 2011
80 *> \ingroup auxOTHERauxiliary
82 * =====================================================================
83 INTEGER FUNCTION IEEECK( ISPEC, ZERO, ONE )
85 * -- LAPACK auxiliary routine (version 3.4.0) --
86 * -- LAPACK is a software package provided by Univ. of Tennessee, --
87 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
90 * .. Scalar Arguments ..
95 * =====================================================================
98 REAL NAN1, NAN2, NAN3, NAN4, NAN5, NAN6, NEGINF,
99 $ NEGZRO, NEWZRO, POSINF
101 * .. Executable Statements ..
105 IF( POSINF.LE.ONE ) THEN
111 IF( NEGINF.GE.ZERO ) THEN
116 NEGZRO = ONE / ( NEGINF+ONE )
117 IF( NEGZRO.NE.ZERO ) THEN
122 NEGINF = ONE / NEGZRO
123 IF( NEGINF.GE.ZERO ) THEN
128 NEWZRO = NEGZRO + ZERO
129 IF( NEWZRO.NE.ZERO ) THEN
134 POSINF = ONE / NEWZRO
135 IF( POSINF.LE.ONE ) THEN
140 NEGINF = NEGINF*POSINF
141 IF( NEGINF.GE.ZERO ) THEN
146 POSINF = POSINF*POSINF
147 IF( POSINF.LE.ONE ) THEN
155 * Return if we were only asked to check infinity arithmetic
160 NAN1 = POSINF + NEGINF
162 NAN2 = POSINF / NEGINF
164 NAN3 = POSINF / POSINF
172 IF( NAN1.EQ.NAN1 ) THEN
177 IF( NAN2.EQ.NAN2 ) THEN
182 IF( NAN3.EQ.NAN3 ) THEN
187 IF( NAN4.EQ.NAN4 ) THEN
192 IF( NAN5.EQ.NAN5 ) THEN
197 IF( NAN6.EQ.NAN6 ) THEN