Cool. Seems like floating-point error.
You can watch it going off the rails, an order of magnitude or so at a
time, and then stabilizing; quite neat IMO. Perhaps someone who knows
more about numeric analysis can tell what's up:
f=. ({.,~ 111-(1130-3000%{:)%{.)
,. 0{"1 V -&(f^:(<20)) Vx
0
1.42109e_14
2.62013e_13
4.6505e_12
8.19256e_11
1.4334e_9
2.49239e_8
4.30939e_7
7.41345e_6
0.000126962
0.00216572
0.0368028
0.619897
9.4853
61.5333
91.1885
93.8678
94.0257
94.0297
94.0254
Unrelated: here's a semantic difference between floats and exacts:
%%-%0
__
%%-%0x
_
x has infinity, but no signed zero.
-E
On Tue, 25 Jan 2022, Raul Miller wrote:
I was shown this, today:
V=: 2%/\61 11 2
Vx=:2%/\61 11 2x
mk=: {{10j5":({.,~ 111-(1130-3000%{:)%{.)^:100 y}}
mk V
100.00000 100.00000
mk Vx
6.00000 6.00000
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm