Post Reply 
HP 42S Question
02-03-2019, 09:38 PM (This post was last modified: 02-03-2019 10:14 PM by Thomas Okken.)
Post: #3
RE: HP 42S Question
The X<0? function doesn't work on complex numbers. That's what's causing the Invalid Type error message. This makes sense because the complex numbers are not an ordered set, unlike the reals. None of the inequality tests work with them, but X=Y? and X≠Y? do. N.B. Those tests do exhibit some behavior that might be surprising and mathematically questionable, specifically, they consider x and x+0i to be not equal.

In the case of real numbers, the sequence X<0? +/- is equivalent to ABS, but if you want this to work with complex numbers, you should replace it with the actual ABS function, if you want the square root of the magnitude of the number, or leave it out, since SQRT works on all complex numbers.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP 42S Question - lrdheat - 02-03-2019, 08:17 PM
RE: HP 42S Question - lrdheat - 02-03-2019, 08:18 PM
RE: HP 42S Question - Thomas Okken - 02-03-2019 09:38 PM
RE: HP 42S Question - lrdheat - 02-03-2019, 10:02 PM
RE: HP 42S Question - Thomas Okken - 02-03-2019, 10:11 PM
RE: HP 42S Question - Thomas Klemm - 02-04-2019, 05:47 AM
RE: HP 42S Question - lrdheat - 02-04-2019, 03:07 PM
RE: HP 42S Question - SammysHP - 02-04-2019, 05:39 PM
RE: HP 42S Question - lrdheat - 02-05-2019, 06:15 AM



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