• R/O
  • SSH

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Mercurial Patch Queue for Windows System Libraries


File Info

修訂. 637c26973ed73f73fa2f3c4e92278f04ca8bb7f7
大小 1,164 bytes
時間 2019-03-31 21:25:12
作者 Keith Marshall
Log Message

Initial commit.

Content

# HG changeset patch
# Parent c4d8313f54f1f8a436c4ca0fd692e675e91746d6
diff --git a/mingwrt/mingwex/math/powl.c b/mingwrt/mingwex/math/powl.c
--- a/mingwrt/mingwex/math/powl.c
+++ b/mingwrt/mingwex/math/powl.c
@@ -450,34 +450,41 @@ long double powl( long double x, long do
 {
   /* double F, Fa, Fb, G, Ga, Gb, H, Ha, Hb */
   int i, nflg, iyflg, yoddint;
   long e;
 
-  if( y == 0.0L )
+  if( (x == 1.0L) || (y == 0.0L) )
     return( 1.0L );
 
 #ifdef NANS
   if( isnanl(x) )
   {
-    _SET_ERRNO (EDOM);
+    //_SET_ERRNO (EDOM);
     return( x );
   }
   if( isnanl(y) )
   {
-    _SET_ERRNO (EDOM);
+    //_SET_ERRNO (EDOM);
     return( y );
   }
 #endif
 
   if( y == 1.0L )
     return( x );
 
-  if( isinfl(y) && (x == -1.0L || x == 1.0L) )
-    return( y );
+  if( isinfl(y) )
+  {
+    if( x == -1.0L )
+      return( 1.0L );
+    else if( (-1.0L < x) && (x < 1.0L) )
+      return signbitl(y) ? INFINITYL : 0.0L;
+    else
+      return signbitl(y) ? 0.0L : INFINITYL;
+  }
 
-  if( x == 1.0L )
-    return( 1.0L );
+  if( (x == 0.0L) && (y < 0.0L) )
+    _SET_ERRNO (ERANGE);
 
   if( y >= MAXNUML )
   {
     _SET_ERRNO (ERANGE);
 #ifdef INFINITIES