Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

log() and int() problem

by Anonymous Monk
on Dec 25, 2012 at 16:47 UTC ( #1010275=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $x = 125;
    my $l = log($x) / log(5);
    
    ...
    print "int(LOG) == ", int($l), "\n";
    
    print "Are equal: ", ($l == int($l)) ? "true\n" : "false\n";
    
  2. or download this
    LOG      == 3
    int(LOG) == 3
    Are equal: false
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1010275]
Approved by toolic
Front-paged by LanX
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2015-03-03 11:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (70 votes), past polls