Thread Closed 
HP Prime crashes on undef-undef*i in CAS
12-01-2020, 02:10 PM (This post was last modified: 12-01-2020 08:50 PM by Albert Chan.)
Post: #10
RE: HP Prime crashes on undef-undef*i in CAS
(12-01-2020 07:59 AM)parisse Wrote:  Now that it is reported we will of course do our best to fix it.

Thank you, Parisse.

I see 2 ways to fix this.
1). fix PRINT to handle undef - undef*i
2). convert undef - undef*i to plain undef

I like the 2nd way, because it is more consistent, and we can easily test for it

CAS> z = 0/0      → undef
CAS> z == undef      → 1
CAS> type(z)      → DOM_IDENT

CAS> z = 1e108+1e200*i
CAS> z = z/z      → undef
CAS> z == undef      → 0
CAS> type(z)      → DOM_FLOAT

CAS> z = 1e109+1e200*i
CAS> z = z/z      → undef-undef*i
CAS> z == undef      → 0
CAS> z == undef-undef*i      → 0
CAS> type(z)      → DOM_COMPLEX

Last test RHS is "simplified" to plain undef. But, z is stuck with "complex" undef.
Internally converting all types of undef's to "plain" undef seems better.

What do you think ?
Find all posts by this user
Thread Closed 


Messages In This Thread
RE: HP Prime crashes on undef-undef*i in CAS - Albert Chan - 12-01-2020 02:10 PM



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