Fixed a segfault in the nbody benchmark.
This commit is contained in:
parent
b8b852dbc1
commit
01c170c52f
|
@ -131,7 +131,7 @@ Correct output N = 1000 is
|
|||
[dy (- o1y (body-y i1))]
|
||||
[dz (- o1z (body-z i1))]
|
||||
[dist2 (+ (* dx dx) (* dy dy) (* dz dz))]
|
||||
[mag (assert (/ +dt+ (* dist2 (sqrt dist2))) inexact-real?)]
|
||||
[mag (/ +dt+ (* dist2 (assert (sqrt dist2) inexact-real?)))]
|
||||
[dxmag (* dx mag)]
|
||||
[dymag (* dy mag)]
|
||||
[dzmag (* dz mag)]
|
||||
|
|
|
@ -141,7 +141,7 @@ Correct output N = 1000 is
|
|||
[dy (- o1y (body-y i1))]
|
||||
[dz (- o1z (body-z i1))]
|
||||
[dist2 (+ (* dx dx) (* dy dy) (* dz dz))]
|
||||
[mag (assert (/ +dt+ (* dist2 (sqrt dist2))) inexact-real?)]
|
||||
[mag (/ +dt+ (* dist2 (assert (sqrt dist2) inexact-real?)))]
|
||||
[dxmag (* dx mag)]
|
||||
[dymag (* dy mag)]
|
||||
[dzmag (* dz mag)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user