On Thu, 28 Sep 2006 23:53:11 -0700
"Bill Ward" <[EMAIL PROTECTED]> wrote:
> What platform are you using?  32 bit or 64 bit processor?

    Both.  This is the result on my 32 bit platform.

    Long double is 8 bytes, by the way.

[EMAIL PROTECTED] ~ % uname -a
Linux leaf 2.6.8-3-386 #1 Thu Sep 7 05:39:52 UTC 2006 i686 GNU/Linux
[EMAIL PROTECTED] ~ % cat /tmp/test.pl
#! /usr/bin/perl -w

use lib qw(/tmp/Number-Format-1.52/blib/lib);
use Number::Format qw(round);

print "round(123456.78951, -2) = " . round(123456.78951, -2) . "\n";
print "round(123456.78951, -2) - 123500 = "
    . (round(123456.78951, -2) - 123500) . "\n";
[EMAIL PROTECTED] ~ % perl5.8.8 --version

This is perl, v5.8.8 built for i686-linux-thread-multi-64int-ld
...
[EMAIL PROTECTED] ~ % perl5.8.8 /tmp/test.pl
round(123456.78951, -2) = 123500
round(123456.78951, -2) - 123500 = -7.10542735760100186e-15
[EMAIL PROTECTED] ~ % perl5.8.4 --version

This is perl, v5.8.4 built for i386-linux-thread-multi
...
[EMAIL PROTECTED] ~ % perl5.8.4 /tmp/test.pl
round(123456.78951, -2) = 123500
round(123456.78951, -2) - 123500 = 0
[EMAIL PROTECTED] ~ %

--
Best regards,
imacat ^_*' <[EMAIL PROTECTED]>
PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt

<<Woman's Voice>> News: http://www.wov.idv.tw/
Tavern IMACAT's: http://www.imacat.idv.tw/
TLUG List Manager: http://lists.linux.org.tw/cgi-bin/mailman/listinfo/tlug

Attachment: pgpkjMUc8Sj7o.pgp
Description: PGP signature

Reply via email to