Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Getting stranger values in subtraction

by Anonymous Monk
on Feb 06, 2016 at 09:06 UTC ( [id://1154555]=note: print w/replies, xml ) Need Help??


in reply to Re: Getting stranger values in subtraction
in thread Getting stranger values in subtraction

Addendum:

The issue seems to surface if the arithmetic takes place in a loop, when you do the subtraction (or addition as well?) multiple times.

I don't seem to get this problem when the subtraction happens only once in a subroutine (not in a loop).

  • Comment on Re^2: Getting stranger values in subtraction

Replies are listed 'Best First'.
Re^3: Getting stranger values in subtraction
by poj (Abbot) on Feb 06, 2016 at 09:11 UTC
Re^3: Getting stranger values in subtraction
by choroba (Cardinal) on Feb 06, 2016 at 09:10 UTC
    Have you run the code in my reply? There's no loop involved. Also, have you clicked the link provided there and read the article? It answers your question about adition clearly.
    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

      Yes, I ran your code, and then modified mine based on it after that.

      Hmm...I am still puzzled why I haven't seen that kind of anomaly in other parts of my code that do this sort of arithmetic even though I have been testing it for weeks now.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-04-24 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found