set_inf.c revision 1.1.1.4
1139825Simp/* mpfr_set_inf -- set a number to plus or minus infinity. 250128Swpaul 350128SwpaulCopyright 2002, 2004, 2006-2020 Free Software Foundation, Inc. 450128SwpaulContributed by the AriC and Caramba projects, INRIA. 550128Swpaul 650128SwpaulThis file is part of the GNU MPFR Library. 750128Swpaul 850128SwpaulThe GNU MPFR Library is free software; you can redistribute it and/or modify 950128Swpaulit under the terms of the GNU Lesser General Public License as published by 1050128Swpaulthe Free Software Foundation; either version 3 of the License, or (at your 1150128Swpauloption) any later version. 1250128Swpaul 1350128SwpaulThe GNU MPFR Library is distributed in the hope that it will be useful, but 1450128SwpaulWITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 1550128Swpaulor FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 1650128SwpaulLicense for more details. 1750128Swpaul 1850128SwpaulYou should have received a copy of the GNU Lesser General Public License 1950128Swpaulalong with the GNU MPFR Library; see the file COPYING.LESSER. If not, see 2050128Swpaulhttps://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 2150128Swpaul51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ 2250128Swpaul 2350128Swpaul#include "mpfr-impl.h" 2450128Swpaul 2550128Swpaulvoid 2650128Swpaulmpfr_set_inf (mpfr_ptr x, int sign) 2750128Swpaul{ 2850128Swpaul MPFR_SET_INF(x); 2950128Swpaul if (sign >= 0) 3050128Swpaul MPFR_SET_POS(x); 3150128Swpaul else 3250477Speter MPFR_SET_NEG(x); 3350128Swpaul} 3450128Swpaul