Roger,
This ones got me..
We have a bankrcn program
The bankbal is 12,000
openar is 0
opencks is 150,000
other is 11,000
(other is rare, in this case unrecorded deposits at bank)
store BANKBAL+openar to nettot
store nettot-opencks+vother to nettot2
This calculates to 149,000 (nope, it does not)
The system is adding the other to the open checks negative instead of taking it as a stream of numbers.
Did not try (nettot-opencks)+vother but why would that be necessary??
Changed to below and it calculated properly
store BANKBAL+openar to nettot
store nettot-opencks to nettot3
store nettot3+vother to nettot2
Thanks
Fred
Omni
Calculation Issue
Re: Calculation Issue
Would you believe that the below equations are equivalent and should give the same answer?
Code: Select all
? 2 + 4 - 5 + 1 // answer 2
? 2 + 4 - (5 + 1) // answer 0
The eXpress train is coming - and it has more cars.
Re: Calculation Issue
I would not...
Order of Operations:
Rule 1: First perform any calculations inside parentheses.
Rule 2: Next perform all multiplications and divisions, working from left to right.
Rule 3: Lastly, perform all additions and subtractions, working from left to right.
Order of Operations:
Rule 1: First perform any calculations inside parentheses.
Rule 2: Next perform all multiplications and divisions, working from left to right.
Rule 3: Lastly, perform all additions and subtractions, working from left to right.
Re: Calculation Issue
Roger,
No, i do not. It acts as if there is a paren there, which is just weird to me
12,000-150000+11000=149,000 in the program. Its 125,000.
I had to add the 11000 (var) on the next line separately to calculate properly.
Fred
No, i do not. It acts as if there is a paren there, which is just weird to me
12,000-150000+11000=149,000 in the program. Its 125,000.
I had to add the 11000 (var) on the next line separately to calculate properly.
Fred
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Calculation Issue
12000-150000+11000 = -127000
That is what I get in my calculator and in xdot.
Agree with Richard.
That is what I get in my calculator and in xdot.
Agree with Richard.
Re: Calculation Issue
Yes, that was a typo. The issue is the 149,000 it comes up with as if the paren is there.
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Calculation Issue
How can you get a positive 149000 with a -150000 in the equation. Or did you mean -149000