quadlib.c revision 117395
190075Sobrien/* Subroutines for long double support. 2117395Skan Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. 390075Sobrien 490075SobrienThis file is part of GNU CC. 590075Sobrien 690075SobrienGNU CC is free software; you can redistribute it and/or modify 790075Sobrienit under the terms of the GNU General Public License as published by 890075Sobrienthe Free Software Foundation; either version 2, or (at your option) 990075Sobrienany later version. 1090075Sobrien 1190075SobrienIn addition to the permissions in the GNU General Public License, the 1290075SobrienFree Software Foundation gives you unlimited permission to link the 1390075Sobriencompiled version of this file into combinations with other programs, 1490075Sobrienand to distribute those combinations without any restriction coming 1590075Sobrienfrom the use of this file. (The General Public License restrictions 1690075Sobriendo apply in other respects; for example, they cover modification of 1790075Sobrienthe file, and distribution when not linked into a combine 1890075Sobrienexecutable.) 1990075Sobrien 2090075SobrienGNU CC is distributed in the hope that it will be useful, 2190075Sobrienbut WITHOUT ANY WARRANTY; without even the implied warranty of 2290075SobrienMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2390075SobrienGNU General Public License for more details. 2490075Sobrien 2590075SobrienYou should have received a copy of the GNU General Public License 2690075Sobrienalong with GNU CC; see the file COPYING. If not, write to 2790075Sobrienthe Free Software Foundation, 59 Temple Place - Suite 330, 2890075SobrienBoston, MA 02111-1307, USA. */ 2990075Sobrien 30117395Skanextern int _U_Qfcmp (long double a, long double b, int); 3190075Sobrien 32117395Skanint _U_Qfeq (long double, long double); 33117395Skanint _U_Qfne (long double, long double); 34117395Skanint _U_Qfgt (long double, long double); 35117395Skanint _U_Qfge (long double, long double); 36117395Skanint _U_Qflt (long double, long double); 37117395Skanint _U_Qfle (long double, long double); 38117395Skanint _U_Qfcomp (long double, long double); 39117395Skan 4090075Sobrienint 4190075Sobrien_U_Qfeq (long double a, long double b) 4290075Sobrien{ 4390075Sobrien return (_U_Qfcmp (a, b, 4) != 0); 4490075Sobrien} 4590075Sobrien 4690075Sobrienint 4790075Sobrien_U_Qfne (long double a, long double b) 4890075Sobrien{ 4990075Sobrien return (_U_Qfcmp (a, b, 4) == 0); 5090075Sobrien} 5190075Sobrien 5290075Sobrienint 5390075Sobrien_U_Qfgt (long double a, long double b) 5490075Sobrien{ 5590075Sobrien return (_U_Qfcmp (a, b, 17) != 0); 5690075Sobrien} 5790075Sobrien 5890075Sobrienint 5990075Sobrien_U_Qfge (long double a, long double b) 6090075Sobrien{ 6190075Sobrien return (_U_Qfcmp (a, b, 21) != 0); 6290075Sobrien} 6390075Sobrien 6490075Sobrienint 6590075Sobrien_U_Qflt (long double a, long double b) 6690075Sobrien{ 6790075Sobrien return (_U_Qfcmp (a, b, 9) != 0); 6890075Sobrien} 6990075Sobrien 7090075Sobrienint 7190075Sobrien_U_Qfle (long double a, long double b) 7290075Sobrien{ 7390075Sobrien return (_U_Qfcmp (a, b, 13) != 0); 7490075Sobrien} 7590075Sobrien 7690075Sobrienint 7790075Sobrien_U_Qfcomp (long double a, long double b) 7890075Sobrien{ 7990075Sobrien if (_U_Qfcmp (a, b, 4) == 0) 8090075Sobrien return 0; 8190075Sobrien 8290075Sobrien return (_U_Qfcmp (a, b, 22) != 0 ? 1 : -1); 8390075Sobrien} 84