1*c87b03e5Sespie /* Subroutines for long double support.
2*c87b03e5Sespie Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
3*c87b03e5Sespie
4*c87b03e5Sespie This file is part of GNU CC.
5*c87b03e5Sespie
6*c87b03e5Sespie GNU CC is free software; you can redistribute it and/or modify
7*c87b03e5Sespie it under the terms of the GNU General Public License as published by
8*c87b03e5Sespie the Free Software Foundation; either version 2, or (at your option)
9*c87b03e5Sespie any later version.
10*c87b03e5Sespie
11*c87b03e5Sespie In addition to the permissions in the GNU General Public License, the
12*c87b03e5Sespie Free Software Foundation gives you unlimited permission to link the
13*c87b03e5Sespie compiled version of this file into combinations with other programs,
14*c87b03e5Sespie and to distribute those combinations without any restriction coming
15*c87b03e5Sespie from the use of this file. (The General Public License restrictions
16*c87b03e5Sespie do apply in other respects; for example, they cover modification of
17*c87b03e5Sespie the file, and distribution when not linked into a combine
18*c87b03e5Sespie executable.)
19*c87b03e5Sespie
20*c87b03e5Sespie GNU CC is distributed in the hope that it will be useful,
21*c87b03e5Sespie but WITHOUT ANY WARRANTY; without even the implied warranty of
22*c87b03e5Sespie MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23*c87b03e5Sespie GNU General Public License for more details.
24*c87b03e5Sespie
25*c87b03e5Sespie You should have received a copy of the GNU General Public License
26*c87b03e5Sespie along with GNU CC; see the file COPYING. If not, write to
27*c87b03e5Sespie the Free Software Foundation, 59 Temple Place - Suite 330,
28*c87b03e5Sespie Boston, MA 02111-1307, USA. */
29*c87b03e5Sespie
30*c87b03e5Sespie extern int _U_Qfcmp (long double a, long double b, int);
31*c87b03e5Sespie
32*c87b03e5Sespie int _U_Qfeq (long double, long double);
33*c87b03e5Sespie int _U_Qfne (long double, long double);
34*c87b03e5Sespie int _U_Qfgt (long double, long double);
35*c87b03e5Sespie int _U_Qfge (long double, long double);
36*c87b03e5Sespie int _U_Qflt (long double, long double);
37*c87b03e5Sespie int _U_Qfle (long double, long double);
38*c87b03e5Sespie int _U_Qfcomp (long double, long double);
39*c87b03e5Sespie
40*c87b03e5Sespie int
_U_Qfeq(long double a,long double b)41*c87b03e5Sespie _U_Qfeq (long double a, long double b)
42*c87b03e5Sespie {
43*c87b03e5Sespie return (_U_Qfcmp (a, b, 4) != 0);
44*c87b03e5Sespie }
45*c87b03e5Sespie
46*c87b03e5Sespie int
_U_Qfne(long double a,long double b)47*c87b03e5Sespie _U_Qfne (long double a, long double b)
48*c87b03e5Sespie {
49*c87b03e5Sespie return (_U_Qfcmp (a, b, 4) == 0);
50*c87b03e5Sespie }
51*c87b03e5Sespie
52*c87b03e5Sespie int
_U_Qfgt(long double a,long double b)53*c87b03e5Sespie _U_Qfgt (long double a, long double b)
54*c87b03e5Sespie {
55*c87b03e5Sespie return (_U_Qfcmp (a, b, 17) != 0);
56*c87b03e5Sespie }
57*c87b03e5Sespie
58*c87b03e5Sespie int
_U_Qfge(long double a,long double b)59*c87b03e5Sespie _U_Qfge (long double a, long double b)
60*c87b03e5Sespie {
61*c87b03e5Sespie return (_U_Qfcmp (a, b, 21) != 0);
62*c87b03e5Sespie }
63*c87b03e5Sespie
64*c87b03e5Sespie int
_U_Qflt(long double a,long double b)65*c87b03e5Sespie _U_Qflt (long double a, long double b)
66*c87b03e5Sespie {
67*c87b03e5Sespie return (_U_Qfcmp (a, b, 9) != 0);
68*c87b03e5Sespie }
69*c87b03e5Sespie
70*c87b03e5Sespie int
_U_Qfle(long double a,long double b)71*c87b03e5Sespie _U_Qfle (long double a, long double b)
72*c87b03e5Sespie {
73*c87b03e5Sespie return (_U_Qfcmp (a, b, 13) != 0);
74*c87b03e5Sespie }
75*c87b03e5Sespie
76*c87b03e5Sespie int
_U_Qfcomp(long double a,long double b)77*c87b03e5Sespie _U_Qfcomp (long double a, long double b)
78*c87b03e5Sespie {
79*c87b03e5Sespie if (_U_Qfcmp (a, b, 4) == 0)
80*c87b03e5Sespie return 0;
81*c87b03e5Sespie
82*c87b03e5Sespie return (_U_Qfcmp (a, b, 22) != 0 ? 1 : -1);
83*c87b03e5Sespie }
84