2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include <libraries/mathieeesp.h>
7 #include <aros/libcall.h>
8 #include <proto/mathieeesingbas.h>
9 #include <proto/mathieeesingtrans.h>
10 #include <proto/exec.h>
11 #include <exec/types.h>
12 #include "mathieeesingtrans_intern.h"
14 LONG
intern_IEEESPLd(ULONG fnum
)
19 if (onehalf
== fnum
) return minusone
;
21 while (Mask
== 0 && i
<= 23)
23 /* if (sqrtone < fnum) */
24 if ( 0x00b504f3 < ((fnum
& IEEESPMantisse_Mask
) | 0x00800000) )
27 fnum
= IEEESPMul(fnum
, fnum
);
32 fnum
= IEEESPMul(fnum
, fnum
);
37 while ((char) Mask
!= 0x40)
39 if ( 0x00b504f3 < ((fnum
& IEEESPMantisse_Mask
) | 0x00800000) )
41 fnum
= IEEESPMul(fnum
, fnum
);
46 fnum
= IEEESPMul(fnum
, fnum
);
53 if ((char) Res
< 0) Res
+= 0x100;
57 return (Res
| ( (0x7e - i
) << 23 ) | IEEESPSign_Mask
);