Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Bitwise Operator Error

by jethro (Monsignor)
on Oct 02, 2008 at 19:21 UTC ( #715077=note: print w/replies, xml ) Need Help??


in reply to Bitwise Operator Error

Even if you follow broomdusters advice, you still have a big problem. The internal numbers presentation automatically changes a number to floating point if it gets too big. Anding floating point numbers is quite useless as you can see here:

$maskResult = 4000000000000000 & 4000000000000000; print $maskResult,"\n"; ####prints 4294967295 $maskResult = 1000000000000000 & 4000000000000000; print $maskResult,"\n"; ####prints 4294967295

If you want to use really large integers you need bigint or Math:BigInt

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://715077]
help
Chatterbox?
erix likes multitail
[afoken]: and tail is part of POSIX, less isn't.
[afoken]: So tail works at every Unix's prompt, less only on a subset.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2017-01-17 20:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (158 votes). Check out past polls.