Active object: Difference between revisions
→{{header|ATS}}: I forgot a factor of 1/2
(Added ATS before →{{header|BASIC}}) |
(→{{header|ATS}}: I forgot a factor of 1/2) |
||
Line 331:
val integral = integral + ((sample_last + sample_now)
* clock2f (t_last - t_now
* g0f2f 0.5)
val sample_last = sample_now
val t_last = t_now
Line 444 ⟶ 445:
One will get different results on different runs.
<pre>$ patscc -std=gnu2x -Ofast active_object_task.dats -lm && ./a.out
integrator output = -0.
=={{header|BASIC}}==
|