Non-numeric stuff in calculations

General discussion about calculators, Swiss Micros or otherwise
H2X
Posts: 592
Joined: Tue Apr 25, 2017 6:00 am
Location: Norway

Re: Non-numeric stuff in calculations

Thomas Okken wrote:
Sat Jan 04, 2020 7: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?
DM42 #40 running WP43C | DM41X #50
The earth is flat. It just appears round because it is massive and curves spacetime.

Jaymos
Posts: 607
Joined: Sun Nov 04, 2018 6:03 pm
Location: Cape Town

Re: Non-numeric stuff in calculations

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
WP34C, HP42S, DM42 for complex math; 35S, 28C, 32Sii, WP34S, EL-506P, EL-W506, PB700; owned FX702P & 11C; used 67 & 85. iOS: 42s (Byron), Free42, WP31S/34S, HCalc.
WP43C running on DM42 sn. 03818 .

H2X
Posts: 592
Joined: Tue Apr 25, 2017 6:00 am
Location: Norway

Re: Non-numeric stuff in calculations

Jaymos wrote:
Sun Jan 05, 2020 1: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!
DM42 #40 running WP43C | DM41X #50
The earth is flat. It just appears round because it is massive and curves spacetime.