thor has asked for the wisdom of the Perl Monks concerning the following question:
What I find interesting is that perl is able to do the math correctly on the large number, but is unable to display it. If anything, I'd expect the opposite behavior (being able to print, but not being able to do arithmetic on it). Thoughts?perl -e '$a = 4_294_967_296;printf("%d %f\n", $a, $a / (1024**3))'
Just curious,
thor
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Arithmetic on numbers bigger than 1<<31
by merlyn (Sage) on May 13, 2004 at 15:51 UTC | |
|
Re: Arithmetic on numbers bigger than 1<<31
by kvale (Monsignor) on May 13, 2004 at 16:07 UTC | |
by tye (Sage) on May 13, 2004 at 20:15 UTC | |
|
Re: Arithmetic on numbers bigger than 1<<31
by flyingmoose (Priest) on May 13, 2004 at 19:27 UTC | |
by thor (Priest) on May 13, 2004 at 20:29 UTC | |
|
Re: Arithmetic on numbers bigger than 1<<31
by zude (Scribe) on May 13, 2004 at 22:40 UTC |