2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "mathtrans_intern.h"
8 /*****************************************************************************
12 AROS_LH2(float, SPPow
,
15 AROS_LHA(float, fnum1
, D1
),
16 AROS_LHA(float, fnum2
, D0
),
19 struct Library
*, MathTransBase
, 15, MathTrans
)
22 Calculate fnum2 raised to the fnum1 power (fnum2^fnum1)
27 Motorola fast floating point number
31 negative : result is negative
32 overflow : result is too big
38 *****************************************************************************/
44 fnum2 ^ fnum1 = e^(fnum1 * ln fnum2)
48 Res
= SPLog( fnum2
& (FFPMantisse_Mask
+ FFPExponent_Mask
) );
49 Res
= SPMul(Res
, fnum1
);
54 SetSR(Zero_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
60 SetSR(Negative_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);