*/
#include "fdlibm.h"
+#include "math_config.h"
+
#if __OBSOLETE_MATH
#ifndef _DOUBLE_IS_32BITS
EXTRACT_WORDS(hy,ly,y);
ix = hx&0x7fffffff; iy = hy&0x7fffffff;
- /* y==zero: x**0 = 1 */
- if((iy|ly)==0) return one;
+ /* y==zero: x**0 = 1 unless x is snan */
+ if((iy|ly)==0) {
+ if (issignaling_inline(x)) return x + y;
+ return one;
+ }
/* x|y==NaN return NaN unless x==1 then return 1 */
if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) ||
iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) {
- if(((hx-0x3ff00000)|lx)==0) return one;
- else return nan("");
+ if(((hx-0x3ff00000)|lx)==0 && !issignaling_inline(y)) return one;
+ else return x + y;
}
/* determine if y is an odd int when x < 0
*/
#include "fdlibm.h"
+#include "math_config.h"
#if __OBSOLETE_MATH
#ifdef __v810__
ix = hx&0x7fffffff; iy = hy&0x7fffffff;
/* y==zero: x**0 = 1 */
- if(FLT_UWORD_IS_ZERO(iy)) return one;
+ if(FLT_UWORD_IS_ZERO(iy)) {
+ if (issignalingf_inline(x)) return x + y;
+ return one;
+ }
/* x|y==NaN return NaN unless x==1 then return 1 */
if(FLT_UWORD_IS_NAN(ix) ||
FLT_UWORD_IS_NAN(iy)) {
- if(hx==0x3f800000) return one;
- else return nanf("");
+ if(hx==0x3f800000 && !issignalingf_inline(y)) return one;
+ else return x + y;
}
/* determine if y is an odd int when x < 0