Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Padding with sprintf changing number

by syphilis (Archbishop)
on Sep 27, 2021 at 14:26 UTC ( #11137041=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    print  "$padamnt i m checking amount after padding,\n";
     return $padamnt;
    }
    
  2. or download this
     Checking amnt before conversion 4887.15,
     Checking amnt after rounding 4887.15,
    ...
    Checking the EXACT value of amnt: 488714.99999999994
    488714 i m checking amount before padding,
    0000000000488714 i m checking amount after padding,
    
  3. or download this
    $ python3 -c "print(4887.15 * 100)"
    488714.99999999994
    
    $ raku -e "say 4887.15e0 * 100"
    488714.99999999994
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11137041]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2022-01-23 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (63 votes). Check out past polls.

    Notices?