2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "mathieeesingtrans_intern.h"
8 /*****************************************************************************
12 AROS_LH1(float, IEEESPSinh
,
15 AROS_LHA(float, y
, D0
),
18 struct Library
*, MathIeeeSingTransBase
, 10, MathIeeeSingTrans
)
21 Calculate the hyperbolic sine of the IEEE single precision number
26 IEEE single precision floating point number
30 negative : result is negative
31 overflow : result is too big for IEEE single precsion format
36 sinh(x) = (1/2)*( e^x- e^(-x) )
38 sinh( |x| >= 9 ) = (1/2) * (e^x);
40 *****************************************************************************/
46 LONG y2
= y
& (IEEESPMantisse_Mask
+ IEEESPExponent_Mask
);
49 if ( IEEESP_Pinfty
== y2
)
51 SetSR(Overflow_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
55 /* sinh(-x) = -sinh(x) */
58 if ( IEEESP_Pinfty
== Res
)
60 SetSR(Overflow_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
64 if ( y2
< 0x41100000 )
67 the following lines is neccessary or otherwise changes in
68 the defines/mathieeesing*.h-files would have to be made!
70 tmp
= IEEESPDiv(one
, Res
);
71 Res
= IEEESPAdd(Res
, tmp
| IEEESPSign_Mask
);
76 /* at this point Res has to be positive to be valid */
79 SetSR(Zero_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
80 return (y
& IEEESPSign_Mask
);
85 SetSR(Negative_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
86 return (Res
| IEEESPSign_Mask
);