Browse Source

* optimization in the 8087/80287 version of fpc_arctan_real(): when calculating
arctan([-]1/d), use fxch to swap the two arguments, instead of using fdivr,
since fpatan can do the division for free

git-svn-id: trunk@26227 -

nickysn 11 years ago
parent
commit
c88be4550d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      rtl/i8086/math.inc

+ 2 - 2
rtl/i8086/math.inc

@@ -132,7 +132,7 @@
 
 @@greater_than_one:
         { d > 1 }
-        fdivr st(1), st            // 1                1/d
+        fxch st(1)                 // d                1
         fpatan                     // arctan(1/d)
         fld tbyte [Extended_PIO2]  // pi/2             arctan(1/d)
         fsubrp st(1), st           // pi/2-arctan(1/d)
@@ -171,7 +171,7 @@
 
 @@less_than_minus_one:
         { d < -1; -d > 1 }
-        fdivr st(1), st            // 1                 -1/d
+        fxch st(1)                 // -d                1
         fpatan                     // arctan(-1/d)
         fld tbyte [Extended_PIO2]  // pi/2              arctan(-1/d)
         fsubp st(1), st            // arctan(-1/d)-pi/2