Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Action at a distance

by hv (Prior)
on Nov 03, 2022 at 12:07 UTC ( #11147934=note: print w/replies, xml ) Need Help??


in reply to Action at a distance

This is deliberate behaviour of Math::BigInt: they are objects, and $x = $y just copies the reference. See the section on "Modifying and =" under CAVEATS. You will see also that binc() is documented in a section Arithmetic methods which is headed "These methods modify the invocand object and returns it" (sic).

Generally the module is designed such that if you treat the objects as numbers it will attempt to do what is needed to preserve that illusion; if you treat them as objects, by calling methods on them, you need to read rather more of the docs.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2023-02-03 13:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (25 votes). Check out past polls.

    Notices?