September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
10
Task/Euler-method/Jq/euler-method-2.jq
Normal file
10
Task/Euler-method/Jq/euler-method-2.jq
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
def euler_solution(df; x1; y1; x2; h):
|
||||
def recursion(exp): reduce recurse(exp) as $x (.; $x);
|
||||
h as $h
|
||||
| [x1, y1]
|
||||
| recursion( if ((.[0] < x2 and x1 < x2) or
|
||||
(.[0] > x2 and x1 > x2)) then
|
||||
[ (.[0] + $h), (.[1] + $h*df) ]
|
||||
else empty
|
||||
end )
|
||||
| .[1] ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue