haskell-chart
haskell-chart copied to clipboard
Protect agains infinite loop when plotting tiny ranges
simple fix for #128
I've pushed a fix to avoid the freeze in this commit: https://github.com/timbod7/haskell-chart/commit/f27955b11fbdb68c8b56984a67c1eee933f0edc9
The issue is that this expression:
10 ^^ ((floor $ log10 $ delta / nsteps)::Integer
will eat all RAM in bigint calculations when delta = 0
This doesn't guarantee you'll get sensible charts with tiny values - your patch may still be necessary for this. Test it and if it is necessary, I will merge.