diff options
Diffstat (limited to 'newlib/libm/machine/spu/headers/logbf4.h')
-rw-r--r-- | newlib/libm/machine/spu/headers/logbf4.h | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/newlib/libm/machine/spu/headers/logbf4.h b/newlib/libm/machine/spu/headers/logbf4.h index 6b5321cac..d3dbeeb93 100644 --- a/newlib/libm/machine/spu/headers/logbf4.h +++ b/newlib/libm/machine/spu/headers/logbf4.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2008, */ +/* (C)Copyright 2006,2007, */ /* International Business Machines Corporation */ /* All Rights Reserved. */ /* */ @@ -19,6 +19,18 @@ /* contributors may be used to endorse or promote products */ /* derived from this software without specific prior written */ /* permission. */ +/* Redistributions of source code must retain the above copyright */ +/* notice, this list of conditions and the following disclaimer. */ +/* */ +/* Redistributions in binary form must reproduce the above */ +/* copyright notice, this list of conditions and the following */ +/* disclaimer in the documentation and/or other materials */ +/* provided with the distribution. */ +/* */ +/* Neither the name of IBM Corporation nor the names of its */ +/* contributors may be used to endorse or promote products */ +/* derived from this software without specific prior written */ +/* permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ @@ -45,18 +57,19 @@ /* * FUNCTION - * vector float _logbf4(vector float x) + * vector float _scalbnf4(vector float x, vector signed int exp) * * DESCRIPTION - * The _logbf4 function returns a vector float that contains the exponent - * of the corresponding elements of the input vector x. The exponent is - * defined by: - * x = frac * FLT_RADIX^exp, with frac in [1, FLT_RADIX). + * The _scalbnf4 function returns a vector containing each element of x + * multiplied by 2^n computed efficiently. This function is computed + * without the assistance of any floating point operations and as such + * does not set any floating point exceptions. * - * Special Cases: - * x = 0, result is undefined. - * x = NaN, result is NaN. - * x = infinity, +infinity is returned. + * Special Cases: + * - if the exponent is 0, then x is either 0 or a subnormal, and the + * result will be returned as 0. + * - if the result if underflows, it will be returned as 0. + * - if the result overflows, it will be returned as FLT_MAX. * */ static __inline vector float _logbf4(vector float x) |