Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / mathffp / spsub.c
blobd228db08665ad07e2358c2915fb3332a666f0130
1 /*
2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "mathffp_intern.h"
8 /*****************************************************************************
10 NAME */
12 AROS_LH2(float, SPSub,
14 /* SYNOPSIS */
15 AROS_LHA(float, fnum1, D1),
16 AROS_LHA(float, fnum2, D0),
18 /* LOCATION */
19 struct LibHeader *, MathBase, 12, Mathffp)
21 /* FUNCTION
22 Subtract two floating point numbers
23 fnum = fnum2 - fnum1;
25 INPUTS
27 RESULT
28 FFP number
30 Flags:
31 zero : result is zero
32 negative : result is negative
33 overflow : result is out of range
35 BUGS
37 SEE ALSO
38 SPAdd()
40 INTERNALS
41 ALGORITHM:
42 fnum = fnum2 + (-fnum1).
44 *****************************************************************************/
46 AROS_LIBFUNC_INIT
48 float r = SPAdd(fnum2, fnum1 ^ FFPSign_Mask);
49 D(kprintf("SPSub(%x - %x) = %x\n", fnum2, fnum1, r));
50 return r;
52 AROS_LIBFUNC_EXIT