Commit 69237a3 1 parent 7ab1537 commit 69237a3 Copy full SHA for 69237a3
File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -72,11 +72,11 @@ DECIMAL
72
72
THEN
73
73
2DUP 2DUP FTRUNC F= IF
74
74
2DUP ['] F>D CATCH 0= IF
75
- 2SWAP 2DROP
76
75
2DUP DABS 17. DU< IF
77
76
DROP
78
77
DUP 0< >R
79
78
ABS >R
79
+ 2DROP
80
80
1E0
81
81
BEGIN
82
82
R@ 1 AND IF 2OVER F* THEN
@@ -91,11 +91,10 @@ DECIMAL
91
91
THEN
92
92
OVER 1 AND IF
93
93
2OVER F0< IF
94
- D>F 2SWAP FABS 2SWAP F^ FNEGATE EXIT
94
+ 2DROP 2SWAP FABS 2SWAP F^ FNEGATE EXIT
95
95
THEN
96
96
THEN
97
- D>F
98
- 2SWAP FABS 2SWAP
97
+ 2DROP 2SWAP FABS 2SWAP
99
98
ELSE
100
99
2DROP
101
100
THEN
Original file line number Diff line number Diff line change @@ -344,11 +344,11 @@ DECIMAL
344
344
\ exponentiation by squaring r1^n when n is a small integer |n|<=16
345
345
2DUP 2DUP FTRUNC F= IF \ r2 has no fractional part
346
346
2DUP ['] F>D CATCH 0= IF \ r2 is convertable to a double n
347
- 2SWAP 2DROP \ drop old r2
348
347
2DUP DABS 17. DU< IF \ |n| <= 16
349
348
DROP \ drop high order of n
350
349
DUP 0< >R \ save sign of n
351
350
ABS >R \ save |n|
351
+ 2DROP \ drop old r2
352
352
1E0 \ -- r1 1.0
353
353
BEGIN
354
354
R@ 1 AND IF 2OVER F* THEN
@@ -363,11 +363,10 @@ DECIMAL
363
363
THEN
364
364
OVER 1 AND IF \ n is odd
365
365
2OVER F0< IF \ r1 is negative
366
- D>F 2SWAP FABS 2SWAP F^ FNEGATE EXIT \ return -(|r1|^n)
366
+ 2DROP 2SWAP FABS 2SWAP F^ FNEGATE EXIT \ return -(|r1|^n)
367
367
THEN
368
368
THEN
369
- D>F \ convert even integer n back to r2
370
- 2SWAP FABS 2SWAP \ we want to return |r1|^r2
369
+ 2DROP 2SWAP FABS 2SWAP \ we want to return |r1|^r2
371
370
ELSE
372
371
2DROP \ drop copy of r2
373
372
THEN
You can’t perform that action at this time.
0 commit comments