Avoid division by 0 when there are no contract samples.

This commit is contained in:
Vincent St-Amour 2014-03-14 16:29:50 -04:00
parent a662f72c9e
commit a9504825ea

View File

@ -151,7 +151,7 @@
(define total-contract-time
(max 1e-20 (for/sum ([b (in-list all-boundaries)]) (boundary-time b))))
(define max-self%
(/ (for/fold ([m 0]) ([b (in-list all-boundaries)])
(/ (for/fold ([m 1e-20]) ([b (in-list all-boundaries)])
(max m (boundary-time b)))
total-contract-time))