[AusNOG] Looking for employees? Melbourne based

Mark Dignam mark at innaloo.net
Fri Oct 11 16:11:22 EST 2013


And here's me thinking it was that old school Pentium processor you were
using. :)

http://en.wikipedia.org/wiki/Pentium_FDIV_bug

-----Original Message-----
From: AusNOG [mailto:ausnog-bounces at lists.ausnog.net] On Behalf Of Ross
Wheeler
Sent: Friday, 11 October 2013 12:55 PM
To: Beeson, Ayden
Cc: ausnog at lists.ausnog.net
Subject: Re: [AusNOG] Looking for employees? Melbourne based


> I even went to confirm it to see if Perl didn't have that problem:
> perl
> print 0.2+0.1;
> 0.3
>
> Working as intended :)

The problem of floating point approximating numbers that are not exact
powers of 2 remains the problem, regardless of how your chosen language
handles it.

$ echo "scale=50; 1/10+2/10"|bc
.30000000000000000000000000000000000000000000000000

$ awk 'BEGIN{printf("%.40f\n",1/10+2/10)}'
0.3000000000000000444089209850062616169453


_______________________________________________
AusNOG mailing list
AusNOG at lists.ausnog.net
http://lists.ausnog.net/mailman/listinfo/ausnog




More information about the AusNOG mailing list