Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^5: Math::Base - arithmetics with baseX integers (OP updated)

by no_slogan (Deacon)
on Aug 24, 2017 at 03:01 UTC ( [id://1197899]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Math::Base - arithmetics with baseX integers (OP updated)
in thread Math::Base - arithmetics with baseX integers (updated)

Do you seriously think I don't already know that? But I'm not worried about the implementation. I just can't imagine that someone would want to get the result 1-2=18446744073709551615. That's ridiculous C behavior that we've all gotten used to, and it might even be useful in a few situations, but it's not good behavior that anyone should be trying to emulate in a high-level language.

Replies are listed 'Best First'.
Re^6: Math::Base - arithmetics with baseX integers (OP updated)
by BrowserUk (Patriarch) on Aug 24, 2017 at 12:35 UTC
    I just can't imagine that someone would want to get the result 1-2=18446744073709551615

    That's exactly what I know you know, but aren't thinking through.

    Just because the internal representation of -1 can be displayed as an unsigned 64-bit integer; it doesn't have to be.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
    In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-03-29 14:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found