The test fn integrate 0 10 12 evaluates to a verb rather than to
98611112.950182 14
I suspect this is indicates a more widely spread issue with old style
codes.which I haven't grokked anyway.
$ j
JVERSION
Engine: j903/j64avx2/linux
Release-b: commercial/2022-01-28T04:13:29
Library: 9.03.08
Platform: Linux 64
Installer: J903 install
InstallPath: /home/lambertdw/downloads/installs/j903
Contact: www.jsoftware.com
load'~addons/math/misc/integrat.ijs'
NB. Note 'examples using each method'
fn=: 3 : '(y^8)+(1 o.y)-y^7'
fn integrate 0 10 12
fn (2 : 0) 0 10 12
:
'lower upper sd'=. 3{.y,8
in=. 5
len=. 2^i.in
diff=. upper-lower
int=. 3 : ',(_1 1*r*3^_0.5)+/+/\r,}:y#+:r=.%+:y'
scale=. [: lower&+ diff&*
f=. diff&*@(+/)@:x@scale@int % +:
g=. f"0 len
whilst. 1 do.
r=. g
whilst. 1<#r do.
t0=. _2}.iv=. r
t1=. }.}:iv
t2=. 2}.iv
s=. t2+t0-+:t1
r=. t2-(-.b)*(*:t2-t1)%s+b=. 0=s
end.
t=. <.-10^.1e_14>.(|-/_2{.iv)%{:iv
if. (10<in) +. sd <: t do. r,t return. end.
g=. g,f"0 [ 2^in,in+1
in=. in+2
end.
)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm