On Sat, 8 Dec 2007, Josh Paetzel wrote: > On Saturday 08 December 2007 01:10:43 pm Brian Hurt wrote: > >>> `./floats.pl | wc -l` = 101 >>> >>> oops! Thats one too many. >> >> This is a fencepost error, not a floating point inaccuracy. >> >> Brian >> > > It's a fencepost error caused by a floating point inaccuracy. Isn't a fencepost error caused by counting incorrectly (one two few) how many items you need to fill some range? Example: http://en.wikipedia.org/wiki/Off-by-one_error#Fencepost_error I think the error pointed out in the example is not of that kind, not a fencepost error. The counting scheme was correct but rounding error changed the stopping point of the loop. If it weren't for the rounding error, it would have worked fine (you can show this by multiplying appropriate values by 10 and running again). Mike