math.numerical-integration: make sure length is an integer.
parent
e2fc9f003a
commit
8d4d0d356f
|
@ -12,7 +12,7 @@ SYMBOL: num-steps
|
||||||
2dup swap - num-steps get / <range> ;
|
2dup swap - num-steps get / <range> ;
|
||||||
|
|
||||||
: generate-simpson-weights ( seq -- seq )
|
: generate-simpson-weights ( seq -- seq )
|
||||||
length 2 / 2 - { 2 4 } <repetition> concat
|
length 1 + 2/ 2 - { 2 4 } <repetition> concat
|
||||||
{ 1 4 } { 1 } surround ;
|
{ 1 4 } { 1 } surround ;
|
||||||
|
|
||||||
: integrate-simpson ( from to quot -- x )
|
: integrate-simpson ( from to quot -- x )
|
||||||
|
|
Loading…
Reference in New Issue