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

Re: Re: Dividing and format

by TheFluffyOne (Beadle)
on Nov 27, 2003 at 17:41 UTC ( [id://310564]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $number = 12650 / 10000;
    $dp = 2;
    ...
    print "val2 = val1 + 0.5 = $val2\n";
    print "val3 = int(val2) = $val3\n";
    print "val4 = val3 / exp = $val4\n";
    
  2. or download this
    Actual: 1.265
    val1 = value x exp = 126.5
    val2 = val1 + 0.5 = 127
    val3 = int(val2) = 126
    val4 = val3 / exp = 1.26
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-24 04:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found