Post Reply 
( Free42 , DM42 ) Overflow is not trapped of basic matrix arithmetic,
08-12-2023, 12:44 PM
Post: #1
( Free42 , DM42 ) Overflow is not trapped of basic matrix arithmetic,
Dear all

I came across something strange with overflow or out range error reporting for basic matrix arithmetic.

With flag 24 clear and 25 clear, any overflow should result in aborted calculation and a warning.

However consider this simple example where matrix multiplication and overflow is not trapped, it only result in elements being silently replaced by maxreal

DM42 or Free42 in decimal mode flag 24 clear, flag 25 clear

1
ENTER
NEW
8E6144
+
STO M

Matrix multiplication:
RCL M
ENTER
x
result in numbers being silently replaced by maxreal ( 9.99999E6144)

Matrix scaling:
RCL M 10 x
if you scale by 10 you get an error as you should

Matrix addition:
RCL M ENTER +
for addition you get an error as it should.

When in binary mode the limits are different but with same inconsistency

Can anyone check this on a real hp42s?

It is not often you get overflow with the new large floating point range, but still surprising to find this after all the use for many years.

Best regards
Gjermund
Find all posts by this user
Quote this message in a reply
08-12-2023, 06:49 PM (This post was last modified: 08-12-2023 09:16 PM by rprosperi.)
Post: #2
RE: ( Free42 , DM42 ) Overflow is not trapped of basic matrix arithmetic,
A 42S cannot handle the value 8E6144...

MAXREAL on the 42S is 9.99999999999 E499

So I tried using 8E499 in the above set of steps but it never yields an error.

I'm pretty sure 8E499 is not the right value, but not sure what you think the analogous value to use should be.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
08-12-2023, 10:55 PM
Post: #3
RE: ( Free42 , DM42 ) Overflow is not trapped of basic matrix arithmetic,
Free42 3.0.15 (the one in the DM42) does indeed not catch that, but version 3.0.20 and the brandnew 3.0.21 do.

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
08-13-2023, 10:06 AM (This post was last modified: 08-13-2023 10:23 AM by Werner.)
Post: #4
RE: ( Free42 , DM42 ) Overflow is not trapped of basic matrix arithmetic,
Update: in Free42, it's a Preferences menu option ;-) it's clear per default, as that is the 42S behavior
in the DM42 you can't change it.

It turns out that this is 42S behavior.
42S matrix operations act as if F24 is set all the time, e.g. :
(with F24 clear)
1
ENTER
NEWMAT
9E499
+
ENTER
+
EDIT
yields 9.999..E499, MAXREAL

Don't know which version of Free42 changed it, it isn't in the history.
At the very least, the DM42 acts as the real 42S in this regard.
I'll ask Thomas about it
Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
08-13-2023, 10:37 AM
Post: #5
RE: ( Free42 , DM42 ) Overflow is not trapped of basic matrix arithmetic,
Hi Werner,
thanks for investigating, and the reminder of Free42 preferences setting.
BR Gjermund
Find all posts by this user
Quote this message in a reply
Post Reply 




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