2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "mathieeesingtrans_intern.h"
10 Calculate the hyperbolic sine of the IEEE single precision number
13 IEEE single precision floating point number
17 negative : result is negative
18 overflow : result is too big for IEEE single precsion format
30 sinh(x) = (1/2)*( e^x- e^(-x) )
32 sinh( |x| >= 9 ) = (1/2) * (e^x);
37 AROS_LH1(float, IEEESPSinh
,
38 AROS_LHA(float, y
, D0
),
39 struct Library
*, MathIeeeSingTransBase
, 10, MathIeeeSingTrans
45 LONG y2
= y
& (IEEESPMantisse_Mask
+ IEEESPExponent_Mask
);
48 if ( IEEESP_Pinfty
== y2
)
50 SetSR(Overflow_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
54 /* sinh(-x) = -sinh(x) */
57 if ( IEEESP_Pinfty
== Res
)
59 SetSR(Overflow_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
63 if ( y2
< 0x41100000 )
66 the following lines is neccessary or otherwise changes in
67 the defines/mathieeesing*.h-files would have to be made!
69 tmp
= IEEESPDiv(one
, Res
);
70 Res
= IEEESPAdd(Res
, tmp
| IEEESPSign_Mask
);
75 /* at this point Res has to be positive to be valid */
78 SetSR(Zero_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
79 return (y
& IEEESPSign_Mask
);
84 SetSR(Negative_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
85 return (Res
| IEEESPSign_Mask
);