1*181254a7Smrg /* Return minimum numeric value of X and Y. 2*181254a7Smrg Copyright (C) 1997-2018 Free Software Foundation, Inc. 3*181254a7Smrg This file is part of the GNU C Library. 4*181254a7Smrg Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. 5*181254a7Smrg 6*181254a7Smrg The GNU C Library is free software; you can redistribute it and/or 7*181254a7Smrg modify it under the terms of the GNU Lesser General Public 8*181254a7Smrg License as published by the Free Software Foundation; either 9*181254a7Smrg version 2.1 of the License, or (at your option) any later version. 10*181254a7Smrg 11*181254a7Smrg The GNU C Library is distributed in the hope that it will be useful, 12*181254a7Smrg but WITHOUT ANY WARRANTY; without even the implied warranty of 13*181254a7Smrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14*181254a7Smrg Lesser General Public License for more details. 15*181254a7Smrg 16*181254a7Smrg You should have received a copy of the GNU Lesser General Public 17*181254a7Smrg License along with the GNU C Library; if not, see 18*181254a7Smrg <http://www.gnu.org/licenses/>. */ 19*181254a7Smrg 20*181254a7Smrg #include "quadmath-imp.h" 21*181254a7Smrg 22*181254a7Smrg __float128 fminq(__float128 x,__float128 y)23*181254a7Smrgfminq (__float128 x, __float128 y) 24*181254a7Smrg { 25*181254a7Smrg if (__builtin_islessequal (x, y)) 26*181254a7Smrg return x; 27*181254a7Smrg else if (__builtin_isgreater (x, y)) 28*181254a7Smrg return y; 29*181254a7Smrg else if (issignalingq (x) || issignalingq (y)) 30*181254a7Smrg return x + y; 31*181254a7Smrg else 32*181254a7Smrg return isnanq (y) ? x : y; 33*181254a7Smrg } 34