Fixed a segfault in the nbody benchmark.

This commit is contained in:
Vincent St-Amour 2010-07-16 14:29:12 -04:00
parent b8b852dbc1
commit 01c170c52f
2 changed files with 2 additions and 2 deletions

View File

@ -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)]

View File

@ -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)]