Re: bitwise operations limited to 32 bits

new topic     » goto parent     » topic index » view thread      » older message » newer message

If you don't like the way the bit op operations work. You are not alone. You can always override them. The easiest way is to pass atoms to int_to_bits do the op and convert them back:

override function or_bits(atom a, atom b) 
    return bits_to_int(eu:or_bits(int_to_bits(a),int_to_bits(b))) 
end function 

This will give you the functionality you desire and you can optimize it later on. You might want to make different types to replace 'atom' here for catching numbers that are too big or have a fractional part.

Shawn Pringle

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu