Re: [9fans] a bug in awk?

2009-01-11 Thread Tharaneedharan Vilwanathan
hi erik, i had a temp code in dumvacroots.new: ... rc | awk '/5946903e/ { next; } $3==16 {printf(%s\n, $0)}' which i removed it now, built awk with your fix in place and tried. the problem is fixed now. thanks for the fix. regards dharani On Sat, Jan

Re: [9fans] a bug in awk?

2009-01-10 Thread John Stalker
For what it's worth, bwk awk does not have this problem, so the error must be in code introduced later. Note the 5946903e318 which AWK may mistakenly treat as a floating point constant. Now to figure how to prevent such errors... -- John Stalker School of Mathematics Trinity College Dublin

Re: [9fans] a bug in awk?

2009-01-10 Thread erik quanstrom
For what it's worth, bwk awk does not have this problem, so the error must be in code introduced later. Note the 5946903e318 which AWK may mistakenly treat as a floating point constant. Now to figure how to prevent such errors... from the better than nothin' department ... i have an

Re: [9fans] a bug in awk?

2009-01-10 Thread Russ Cox
is there some reason that the regular strtod is unsuitable for ape? for one thing, the regular (= plan 9 libc) strtod doesn't set errno. russ

Re: [9fans] a bug in awk?

2009-01-10 Thread erik quanstrom
is there some reason that the regular strtod is unsuitable for ape? for one thing, the regular (= plan 9 libc) strtod doesn't set errno. i didn't say exactly what i ment. would adding errno setting and potentially altering return values (i'm not clear if this is necessary) be sufficient to

[9fans] a bug in awk?

2009-01-09 Thread Tharaneedharan Vilwanathan
hi, while i was playing with venti archive, i found something interesting. i used dumpvacroots.new (from contrib) and for some reason, awk bailed out with floating point error whenever it saw a line with a specific root score. here are the two sample lines (i used customized printarena.c which

Re: [9fans] a bug in awk?

2009-01-09 Thread lucio
11258672 5946903e318d3596c21e35b42a13c1dea5fd32cc 0 Note the 5946903e318 which AWK may mistakenly treat as a floating point constant. Now to figure how to prevent such errors... ++L

Re: [9fans] a bug in awk?

2009-01-09 Thread Tharaneedharan Vilwanathan
hi lucio, so, it tries to interpret as a floating-point no and goes for a toss! thanks for the quick response. regards dharani On Fri, Jan 9, 2009 at 10:26 PM, lu...@proxima.alt.za wrote: 11258672 5946903e318d3596c21e35b42a13c1dea5fd32cc 0 Note the 5946903e318 which AWK may