some fixes to accented characters
[tangerine.git] / rom / mathieeesingbas / ieeespabs.c
blobb69c44412078e8e52fb9bcdc207f39f2317da295
1 /*
2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "mathieeesingbas_intern.h"
8 /*
9 FUNCTION
10 Calculate the absolute value of a given floating point number
12 RESULT
13 absolute value of y
15 Flags:
16 zero : result is zero
17 negative : result is negative
18 overflow : 0
20 NOTES
22 EXAMPLE
24 BUGS
26 SEE ALSO
29 INTERNALS
30 ALGORITHM:
31 set the sign-bit to zero
33 HISTORY
36 AROS_LH1(float, IEEESPAbs,
37 AROS_LHA(float, y, D0),
38 struct LibHeader *, MathIeeeSingBasBase, 9, Mathieeesingbas
41 AROS_LIBFUNC_INIT
43 if (0 == y)
45 /* value is 0 -> set the Zero Flag */
46 SetSR( Zero_Bit, Zero_Bit | Overflow_Bit | Negative_Bit);
48 else
50 /* set the sign-bit to zero */
51 y &= (IEEESPMantisse_Mask | IEEESPExponent_Mask);
52 SetSR(0, Zero_Bit | Overflow_Bit | Negative_Bit );
55 return y;
57 AROS_LIBFUNC_EXIT