[35s] Program Err Trapping
04-29-2016, 10:45 PM
Post: #4
 brianddk Junior Member Posts: 24 Joined: Apr 2016
RE: [35s] Program Err Trapping
(04-24-2016 03:09 PM)Dieter Wrote:  The 41C was the first HP to include flags for error trapping (flag 25 for all errors, flag 24 for overflow). Earlier calculators – and most midrange programmable models that followed – did not offer such a feature.

Ohh... Thanks for the correction. My exposure to the calcs were (in order) {48gx, Free42s, 50g, 35s}. My first three just happened to implement it and didn't realize they were the outliers.

(04-24-2016 03:09 PM)Dieter Wrote:  No, there are no such tests. But nevertheless your program can check whether X is a simple real, a vector or complex. I seem to remember this has been discussed here some time ago.

Yeah, I got the complex check figured out, but I can't seam to figure out how to test for a 2D/3D vector. Been combing the forum archives without luck... I'm sure I'll hit it sooner or later.

(04-24-2016 03:09 PM)Dieter Wrote:  IMHO the best method is a careful choice of the algorithm and a close look at the mathematics behind them. The points where errors may occur usually can be identified beforehand, e.g. in your example the sqrt where X may be negative. Here a x<0? test can branch to an alternate routine that may handle this case, e.g. evaluating the sqrt by 0,5 i 0  y^x in order to get a complex solution.

Yes, honestly, I haven't hit a snag yet where a test for complex or vector is required, I just noticed a few things that surprised me. Getting a bit more accustomed to things now though.

MyCalcs: Physical: {hp48gx, hp50g, hp35s} Emu: {hp42s(Free42), hp41c(v41)}
Blog: https://brianddk.github.io/
 « Next Oldest | Next Newest »

 Messages In This Thread [35s] Program Err Trapping - brianddk - 04-24-2016, 08:40 AM RE: [35s] Program Err Trapping - brianddk - 04-24-2016, 02:44 PM RE: [35s] Program Err Trapping - Dieter - 04-24-2016, 03:09 PM RE: [35s] Program Err Trapping - brianddk - 04-29-2016 10:45 PM

User(s) browsing this thread: 1 Guest(s)