Special cases for single-argument functions

This table summarizes the exceptional circumstances for the floating-point functions of one argument. The second column indicates what exceptions can be raised: inexact (X), underflow (U), overflow (O), invalid (I), and divide-by-zero (Z). The latter columns give the value of each function at , , , and , and indicate what exceptions are raised there, if any.

The table entry "NaN" indicates that the function raises invalid and returns a NaN. The table entry "IErr" indicates that the function raises invalid and returns a platform-dependent value to its integral destination. The functions Log, Log10, Log2, and Logb, which return when evaluated at zero, also raise divide-by-zero there.

Function f Exceptions
Abs + +0 +0 +
AddHalfTruncate X - +0 +0 +
AddHalfTruncateToLong X I IErr {I} 0 0 IErr {I}
ArcCos X I NaN {I} {X} {X} NaN {I}
ArcCosh X I NaN {I} NaN {I} NaN {I} +
ArcSin X U I NaN {I} -0 +0 NaN {I}
ArcSinh X U - -0 +0 +
ArcTan X U I -0 +0
ArcTanh X U -1 -0 +0 1
Ceiling X - -0 +0 +
Cos X I NaN {I} 1 1 NaN {I}
Cosh X O + 1 1 +
Erf X U -1 -0 +0 1
Erfc X U 2 1 1 +0
Exp X U O +0 1 1 +
Exp2 X U 0 +0 1 1 +
ExpMinus1 X U O -1 -0 +0 +
Floor X - -0 +0 +
FPClassify kFPInfinite kFPZero kFPZero kFPInfinite
Gamma X O I Z NaN {I} NaN {I} NaN {I} +
Hash Hash value Hash value Hash value Hash value
IsFinite false true true false
IsInfinite true false false true
IsNaN false false false false
IsNormal false false false false
IsSignNegative true true false false
Log X I Z NaN {I} - {Z} - {Z} +
Log10 X I Z NaN {I} - {Z} - {Z} +
Log1Plus X U I Z NaN {I} -0 +0 +
Log2 X I Z NaN {I} - {Z} - {Z} +
Logb Z + - {Z} - {Z} +
LogGamma X I Z NaN {I} + {Z} + {Z} +
NearbyInt - -0 +0 +
RoundIEEE X - -0 +0 +
RoundToLongIEEE X I IErr {I} 0 0 IErr {I}
Sin X U I NaN {I} -0 +0 NaN {I}
Sinh X U O I - -0 +0 +
Square X U O + +0 +0 +
SquareRoot X I NaN {I} -0 +0 +
Tan X U I NaN {I} -0 +0 NaN {I}
Tanh X U -1 -0 +0 1
Truncate X - -0 +0 +


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker