▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Good to see the usual MOD now in the current release. :-)
But now I've found another problem: contrary to all other calculators that I've checked (HP50g, HP39gII, TI-Nspire, ...) the WP34s returns a negative number for GCD whenever one of its arguments is negative.
Is this intended or just another bug?
IMO the main math functions should work as in all other calculators, else porting any programs is really a nightmare. :-(
Franz
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
The sign behaviour of GCD is intended, although I don't remember why I did it that way.
Fortunately, the fix isn't onerous:
LBL'GCD'
ABS
x[<->] Y
ABS
x[<->] Y // Leave this out if you don't care about Last X
GCD
END
One of the joys of a programmable calculator is you can define your own functions and variants.
MOD is by no means a certainty at this stage.
- Pauli
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
Fortunately, the fix isn't onerous:
Of course not, but it's indeed not nice that the WP34s defines its own math rules. I really don't like to have a (long) list of exceptions where the WP34s return different results than every other calculator, and I would have to 'fix' all those non-standard WP34s functions myself in each program.
Absolutely bad behaviour! :-(
Franz
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
Easier fix that doesn't do the right thing with Last X:
GCD
ABS
I don't remember why I did this so we might as well see what behaviour people want GCD and LCM to have with negative arguments?
Being different to other calculators is fine and good when the rest aren't completely correct. The 41/42 SIGN function e.g. I'm glad to be different there e.g.
- Pauli
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
Being different to other calculators is fine ...
... but not if it's completely against all math standards and different to EVERY other calculator.
And BTW, if for example -4 ENTER 6 GCD returns -2, then this is not the GCD but the LCD. ;-)
Franz
▼
Posts: 167
Threads: 13
Joined: Sep 2008
I'm just curious: why would you ever want to use GCD or LCM with a negative number?!
Nigel (UK)
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
I'm just curious: why would you ever want to use GCD or LCM with a negative number?!
Counter question: why not? ;-)
(division is also defined for negative numbers/integers)
Can't you imagine that you need those GCD/LCM functions in any number theory algorithm? Should you then always have to check if any of the arguments is negative to be sure that the WP34s program will work correctly also with such numbers?
Franz
Edited: 28 June 2012, 10:24 a.m.
Posts: 1,089
Threads: 32
Joined: Dec 2005
Quote:
I don't remember why I did this so we might as well see what behaviour people want GCD and LCM to have with negative arguments?
A negative GCD is nonsense in any case. If you find a negative common divider, you'll immediately have a positive one which is obviously greater. Hence, the GCD is defined as element from the set of non-zero positive integers. Please correct me if I overlooked something.
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
Now apply the same logic to the LCM.....-infinity is looking good for all inputs regardless of sign :-)
- Pauli
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
Now apply the same logic to the LCM.....-infinity is looking good for all inputs regardless of sign :-)
Sorry but that's nothing else than a bad joke.
First GCD/LCM are defined as non-negative integers ('natural numbers'), and -infinity isn't even a 'number' at all.
Franz
Posts: 1,089
Threads: 32
Joined: Dec 2005
Quote: Now apply the same logic to the LCM.....
Pointing out a misnomer doesn't break either logic nor a definition all mathmaticians agreed upon ;-).
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Good that at least one other here supported my GCD/LCM complaint. ;-)
And we have finally convinced Pauli, because it's already changed in the SVN - unfortunately not yet compiled.
Franz
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
And we have finally convinced Pauli, because it's already changed in the SVN - unfortunately not yet compiled.
Pauli, before you go to bed tonight could you please make a new build with the current SVN 3191?
So we would have the GCD/LCM fixed - and also your other todays 'rearrangements' are very much appreciated (at least by me)! ;-)
Franz
Posts: 74
Threads: 1
Joined: Nov 2011
Might as well use the simpler definition as the first one puts the wrong (ABS X) value in LastX anyway.
Plus, I don't see how having LastX will help you undo an incorrect GCD.
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
Plus, I don't see how having LastX will help you undo an incorrect GCD.
And this is true for all functions with 2 operands. That's why I've suggested almost 1 year ago that for every binary operation both X and Y should be saved in L and I (as for complex operations) - but my idea didn't find any open ear.
Franz
▼
Posts: 74
Threads: 1
Joined: Nov 2011
I assume by functions you are excluding basic arithmetic and powers, but LastX helps with any reversible function, such as % or Logx(Y), so it is still useful in many 2 argument functions.
Posts: 1,216
Threads: 75
Joined: Jun 2011
Just an info:
BSRF & BSRB missing in the last build (at least not in any catalog).
And I would also really appreciate having access to the indirect calls iBACK/iBSRF/iBSRB and even the 2 commands A..D-> and ->A..D.
Maybe there could be made a (temporary?) 'expert' build with all these commands? ;-)
Franz
Edited: 1 July 2012, 6:18 a.m.
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
Quote: And I would also really appreciate having access to the indirect calls iBACK/iBSRF/iBSRB and even the 2 commands A..D-> and ->A..D.
Why? These indirect instructions are almost unusable in reality and they produce completely unmaintainable code. Please demonstrate a non-contrived use case for these, just wanting them isn't sufficient. People want everything, usually without thinking. If you do manage to demonstrate a sufficiently good usage of these, we might consider adding them to the firmware. The use case will, of course, have to be significantly better than any other alternative that doesn't use them. Even including CASE is dubious -- if XROM didn't need it, it wouldn't be there.
A..D-> and ->A..D are not going to be exposed. The stored contents disappear forever if you are not very careful -- both writing the program and when running it (they'll disappear if you stop running a program using R/S e.g.). Plus, they'll interact rather badly with the solver. Not something we want available in a "safe" programming environment.
Quote: Maybe there could be made an 'expert' build with all these commands?
Nobody is stopping you upgrading your host machine and building your own image with these included. We, however, are not planning on doing so.
- Pauli
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
I second Pauli's opinion completely :-)
Posts: 1,216
Threads: 75
Joined: Jun 2011
Any plans for a new build with the last changes?
BSRF & BSRB aren't accessable in the last build, and also DBLON/DBLOFF have been moved to the MODE catalog (which is indeed to right place) but are still in P.FCN (contrary what the current manual says).
Franz
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
Quote:
DBLON/DBLOFF have been moved to the MODE catalog (which is indeed to right place) but are still in P.FCN (contrary what the current manual says).
In this rare case the SW is wrong ;-) We'll get that repaired.
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
In this rare case the SW is wrong ;-) We'll get that repaired.
And you've removed again BSRF/BSRB as I can see in your last SVN. Well, it seems you don't like 'experts' working with the WP34s. ;-)
BTW, the next build will be SVN 3200, a perfect number for the final version ... :-)
Franz
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
Quote:
And you've removed again BSRF/BSRB ...
Not true - I just made that file matching the build as is :-) AFAICS there, DBLON & Co. shouldn't be in P.FCN anymore. Strange.
Number-wise, I'd prefer 3535 ;-)
Edited: 3 July 2012, 8:04 a.m. after one or more responses were posted
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
Not true - I just made that file matching the build as is :-)
Well, both functions BSRF/BSRB existed for a long time. 3 days ago Pauli removed them. Then 1 day later he put them back in again, and finally today you removed them again - really funny.
I know why I prefer making all my software projects myself as a single programmer - it's not nice having such troubles with a programming team. ;-)
Quote:
AFAICS there, DBLON & Co. shouldn't be in P.FCN anymore. Strange.
But they are. Putting them into MODE was Pauli's last change, but he didn't make a build after this last source change.
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
Well, also the expert's catalogue existed for a long time. Shall we reintroduce it? ;-) (Learning proceeds in steps sometimes ...)
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
Well, also the expert's catalogue existed for a long time. Shall we reintroduce it? ;-)
Oh my god, of course not! I was the first (and only) one who complained about this arbitrary distribution of 'expert' commands into a separate catalog.
Quote:
(Learning proceeds in steps sometimes ...)
Yes, and in this case it were YOUR steps - and quite a lot I would say ... ;-)
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
Quote:
Yes, and in this case it were YOUR steps - and quite a lot I would say ... ;-)
If it makes you happy, so be it. And being able to learn isn't the worst insult we can get from anybody ;-) Anyway *we've made* the WP 34S while you ...?
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
Anyway *we've made* the WP 34S while you ...?
Well, just look at my website and you'll know what I have made.
http://fhub.110mb.com/
And that's only a very small part of my programming projects, not to forget even 3 programs for the WP34s: TVM, TRIGON and the Polynomial RootSolver PRS (which is no longer available though).
And should I count all my bug-reports, suggestions ... ?
Franz
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
Quote:
And should I count all my bug-reports, suggestions ... ?
Yes, please ;-)
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
Yes, please ;-)
Better not, I don't think that such a long posting would be supported by the forum software. ;-)
I'm rather waiting for the magic build number 3200 ... :-)
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
Bad luck - just wanted to keep you busy for a while ;-/
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
Bad luck - just wanted to keep you busy for a while ;-/
Don't worry, after the next build (when DBLON/OFF is in the correct catalog) you'll not hear anything from me for a very long time, because I consider the next SVN 3200 as final version.
But there would be a much easier way for you: if you can't stand me then simply ignore my postings!
Franz
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
Quote:
... after the next build (...) you'll not hear anything from me for a very long time...
:-D 73 and counting ;-)
Posts: 3,283
Threads: 104
Joined: Jul 2005
Quote:
Oh my god, of course not! I was the first (and only) one who complained about this arbitrary distribution of 'expert' commands into a separate catalog.
You were not alone.
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
You were not alone.
Yes, you're right - there were even more situations where we both had the same opinion. :-)
BTW, could you please make a quick SVN build? The last version isn't up-to-date and the next build number 3200 would be a nice version number. ;-)
Edit: That was really quick - many thanks Marcus!
Now let's hope that nobody finds a bug anymore ... ;-)
Franz
Edited: 3 July 2012, 5:12 p.m.
▼
Posts: 228
Threads: 7
Joined: Aug 2011
Quote:
Now let's hope that nobody finds a bug anymore ... ;-)
That's easy. From now on we call anything unexpected a "feature".
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
That's easy. From now on we call anything unexpected a "feature".
LOL, indeed a good idea!
But it's not really a new idea, many programmers and companies already do this. ;-)
|