Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1010275]
Approved by toolic
Front-paged by LanX
[Lady_Aleena]: This evening, I thought to myself, "I would love to search Netflix for 100 randomfilms from my database to see if they have them." So I went to CPAN to see if there were a modiule which could do such a thing. There is, but GUH! ...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2017-01-21 02:28 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (180 votes). Check out past polls.