ieeeck
C IEEECK SOURCE BP208322 20/09/18 21:17:01 10718
*> \brief \b IEEECK
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
*> \htmlonly
*> Download IEEECK + dependencies
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ieeeck.f">
*> [TGZ]</a>
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ieeeck.f">
*> [ZIP]</a>
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ieeeck.f">
*> [TXT]</a>
*> \endhtmlonly
*
* Definition:
* ===========
*
* INTEGER FUNCTION IEEECK( ISPEC, ZERO, ONE )
*
* .. Scalar Arguments ..
* INTEGER ISPEC
* REAL ONE, ZERO
* ..
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> IEEECK is called from the ILAENV to verify that Infinity and
*> possibly NaN arithmetic is safe (i.e. will not trap).
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] ISPEC
*> \verbatim
*> ISPEC is INTEGER
*> Specifies whether to test just for inifinity arithmetic
*> or whether to test for infinity and NaN arithmetic.
*> = 0: Verify infinity arithmetic only.
*> = 1: Verify infinity and NaN arithmetic.
*> \endverbatim
*>
*> \param[in] ZERO
*> \verbatim
*> ZERO is REAL
*> Must contain the value 0.0
*> This is passed to prevent the compiler from optimizing
*> away this code.
*> \endverbatim
*>
*> \param[in] ONE
*> \verbatim
*> ONE is REAL
*> Must contain the value 1.0
*> This is passed to prevent the compiler from optimizing
*> away this code.
*>
*> RETURN VALUE: INTEGER
*> = 0: Arithmetic failed to produce the correct answers
*> = 1: Arithmetic produced the correct answers
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \date December 2016
*
*> \ingroup OTHERauxiliary
*
* =====================================================================
*
* -- LAPACK auxiliary routine (version 3.7.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* December 2016
IMPLICIT INTEGER(I-N)
IMPLICIT REAL*8(A-H,O-Z)
*
* .. Scalar Arguments ..
INTEGER ISPEC
* ..
*
* =====================================================================
*
* .. Local Scalars ..
REAL*8 NAN1, NAN2, NAN3, NAN4, NAN5, NAN6, NEGINF,
& NEGZRO, NEWZRO, POSINF
* ..
* .. Executable Statements ..
*
IF ( POSINF.LE.ONE ) THEN
RETURN
END IF
*
RETURN
END IF
*
NEGZRO = ONE / ( NEGINF+ONE )
RETURN
END IF
*
NEGINF = ONE / NEGZRO
RETURN
END IF
*
RETURN
END IF
*
POSINF = ONE / NEWZRO
IF ( POSINF.LE.ONE ) THEN
RETURN
END IF
*
NEGINF = NEGINF*POSINF
RETURN
END IF
*
POSINF = POSINF*POSINF
IF ( POSINF.LE.ONE ) THEN
RETURN
END IF
* Return if we were only asked to check infinity arithmetic
*
IF( ISPEC.EQ.0 )
& RETURN
*
NAN1 = POSINF + NEGINF
*
NAN2 = POSINF / NEGINF
*
NAN3 = POSINF / POSINF
*
*
NAN5 = NEGINF*NEGZRO
*
*
IF ( NAN1.EQ.NAN1 ) THEN
RETURN
END IF
*
IF ( NAN2.EQ.NAN2 ) THEN
RETURN
END IF
*
IF ( NAN3.EQ.NAN3 ) THEN
RETURN
END IF
*
IF ( NAN4.EQ.NAN4 ) THEN
RETURN
END IF
*
IF ( NAN5.EQ.NAN5 ) THEN
RETURN
END IF
*
IF ( NAN6.EQ.NAN6 ) THEN
RETURN
END IF
*
RETURN
END
					© Cast3M 2003 - Tous droits réservés.
					Mentions légales