On 26 Apr 2005 11:35:59 -0000, Govardhan M. V wrote:
>  
> Hi
> 
> $a = 1234567890123456789;
> printf ("%0.0f\n", $a);
> 
> Out Put is
> 1234567890123456800
> 
> which is wrong can any one let me know how do we handle
> Digits More than 15 digits ..
> 

There is no "wrong" here. When trying to store a number larger than
the largest integer possible on your platform, perl converts to float.
Any C app compiled with the same compiler would do the same.
For details of when and which conversions take place, read "perldoc
perlnumber". Anyway, you can use Math::BigInt to handle large
integers.

HTH,
-- 
Offer Kaye

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to