|Dec 17, 2012, 11:23 AM||#1|
Very odd error in looping - possible bug in AWK maths library?
I use AWK (C-like programming language used to parse tables - and, yes, I know that's primitive of me). Check out the following behaviour
for (x=0.01;x<=0.05;x+=0.01) Stops at 0.05 as expected
for (x=0.01;x<=0.06;x+=0.01) Stops at 0.05
for (x=0.01;x<=0.06000001;x+=0.01) Stops at 0.06 as expected
for (x=0.1;x<=0.6;x+=0.1) Stops at 0.6, as expected
for (x=0.01;x<=0.10;x+=0.01) Stops at 0.10 as expected and steps through 0.06 just fine
Possible maths library bug? Anybody else able to confirm this perhaps with C (I am not sure, but I presume AWK uses C's maths libraries)?
Mac OS X 10.8.2
iMac 27" i7
My first was a Mac+. Now I own an iPhone with 3.5x the pixels, a colour display, WiFi, 512x the RAM, >1500x the data storage, and 100x the speed. And it fits in the palm of my hand.
Last edited by VulchR; Dec 17, 2012 at 11:39 AM.
|awk, bug, looping|
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Odd Safari bug when printing to PDF||chriscl||OS X Mavericks (10.9)||2||Oct 12, 2013 01:21 PM|
|Odd iMessage Bug Truncates Last Word of Certain Text Phrases||MacRumors||MacRumors.com News Discussion||105||Sep 16, 2013 08:48 PM|
|Odd Finder bug||Soundflunky||OS X Mavericks (10.9)||4||Aug 11, 2013 10:23 PM|
|Odd Mountain Lion Crashing Bug Brings Down Nearly Any App||MacRumors||MacRumors.com News Discussion||188||Apr 15, 2013 02:50 AM|
All times are GMT -5. The time now is 05:14 AM.