Non-numeric stuff in calculations

General discussion about calculators, SwissMicros or otherwise
H2X
Posts: 885
Joined: Tue Apr 25, 2017 8:00 am
Location: Norðvegr
Contact:

Re: Non-numeric stuff in calculations

Post by H2X »

Thomas Okken wrote:
Sat Jan 04, 2020 8:18 pm
... Out of Range, Divide by 0, Invalid Data, and Stat Math Error ...
Nice examples of "information about why it's not a number" which I was referring to earlier.

@Jaymos, with an exception-handling mechanism in place, you'd be fine?

@Walter, I assume there is or will be one in the 43S?
What is the metric tensor in imperial units?
User avatar
Jaymos
Posts: 1635
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: Non-numeric stuff in calculations

Post by Jaymos »

H2X

My example shows the need for handling of some sort, as long as an error doesn’t stop execution. Either way will work for that. The identification of the incoming operand number as a non-number and the handling-at every math function is one way of doing it, Preventing entry to math functions if the operand number is not defined as number, is another way.

Currently the 43S is allowing non-numbers passing through functions without crashing. My graph procedure therefore requires no special handling for the expected 0/0 state. I like it that way.

I do neither the spec nor the programming of the math functions in the 43S, and since I haven’t programmed the WP34S or HP42S or Free42, I cannot tell which way is most efficient, what the best is for the corner cases, and what the pros and cons of either way are, but you can read a lot more discussion on the GitLab 43S issues on this topic relating to the 43S.

J
Jaco Mostert
Elec Eng, South Africa
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
H2X
Posts: 885
Joined: Tue Apr 25, 2017 8:00 am
Location: Norðvegr
Contact:

Re: Non-numeric stuff in calculations

Post by H2X »

Jaymos wrote:
Sun Jan 05, 2020 2:53 am
H2X

My example shows the need for handling of some sort, as long as an error doesn’t stop execution. Either way will work for that. The identification of the incoming operand number as a non-number and the handling-at every math function is one way of doing it, Preventing entry to math functions if the operand number is not defined as number, is another way.

Currently the 43S is allowing non-numbers passing through functions without crashing. My graph procedure therefore requires no special handling for the expected 0/0 state. I like it that way.

I do neither the spec nor the programming of the math functions in the 43S, and since I haven’t programmed the WP34S or HP42S or Free42, I cannot tell which way is most efficient, what the best is for the corner cases, and what the pros and cons of either way are, but you can read a lot more discussion on the GitLab 43S issues on this topic relating to the 43S.

J
Thanks, Jaymos!
What is the metric tensor in imperial units?
Post Reply