/* IEEE754 floating point arithmetic1* double precision: common utilities2*/3/*4* MIPS floating point support5* Copyright (C) 1994-2000 Algorithmics Ltd.6*7* ########################################################################8*9* This program is free software; you can distribute it and/or modify it10* under the terms of the GNU General Public License (Version 2) as11* published by the Free Software Foundation.12*13* This program is distributed in the hope it will be useful, but WITHOUT14* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or15* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License16* for more details.17*18* You should have received a copy of the GNU General Public License along19* with this program; if not, write to the Free Software Foundation, Inc.,20* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.21*22* ########################################################################23*/242526#include "ieee754dp.h"2728ieee754dp ieee754dp_scalb(ieee754dp x, int n)29{30COMPXDP;3132CLEARCX;3334EXPLODEXDP;3536switch (xc) {37case IEEE754_CLASS_SNAN:38return ieee754dp_nanxcpt(x, "scalb", x, n);39case IEEE754_CLASS_QNAN:40case IEEE754_CLASS_INF:41case IEEE754_CLASS_ZERO:42return x;43case IEEE754_CLASS_DNORM:44DPDNORMX;45break;46case IEEE754_CLASS_NORM:47break;48}49DPNORMRET2(xs, xe + n, xm << 3, "scalb", x, n);50}515253ieee754dp ieee754dp_ldexp(ieee754dp x, int n)54{55return ieee754dp_scalb(x, n);56}575859