Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: int() function (updated)

by LanX (Cardinal)
on Oct 24, 2020 at 11:31 UTC ( #11123118=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      DB<28> $x1 = (1.15*170)+0.50;
    
    ...
      DB<30> printf("%.20f",0.15)
    0.14999999999999999000
      DB<31>
    
  2. or download this
      DB<35> $x1 = (115*170)+50; # no fractions
    
    ...
      DB<37> p "$x1 = ",int $x1
    196 = 196
      DB<38>
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2021-01-21 21:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?