Patrick Amstutz wrote: > Hi, > > I've the following behavior with the seq function on: > > Linux version 2.6.18.8-0.3-default ([EMAIL PROTECTED]) (gcc version > 4.1.220061115 (prerelease) (SUSE Linux)) #1 > > $ echo `seq 0.0 0.1 0.8` > 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 > $ echo `seq 0.0 0.1 0.9` > 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
Actually, not a bug. This behavior is described in the info manual ("info seq" or "info coreutils seq"), and has to do with the limitations of binary floating point types; look for the line starting "Be careful when using `seq' with a fractional INCREMENT". You need to use something more like: $ echo `seq 0.0 0.1 0.91` 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils