Post Reply 
50g - Exponent of zero
09-27-2017, 08:20 PM
Post: #4
RE: 50g - Exponent of zero
FWIW, the HP-71B gives you some control over what happens when EXPONENT(0) is executed, by setting the DVZ (DiVision by Zero) trap to 0 (bomb out with an error messasge), 1 (return the default value), or 2 (return the IEEE-suggested value):

TRAP(DVZ,0) @ EXPONENT(0) --> <beep!> ERR:EXPONENT(0)
TRAP(DVZ,1) @ EXPONENT(0) --> <beep!> WRN:EXPONENT(0) --> -9.99999999999E499
TRAP(DVZ,2) @ EXPONENT(0) --> <beep!> WRN:EXPONENT(0) --> -Inf

ERR messages persist in the display until you clear them. WRN messages only flash momentarily (duration is user-settable with the DELAY command).

EXPONENT(0) is such a special case that the HP-71 even assigns a unique error number for it (ERRN=3), which the manual explains as "Indicates attempt to compute the exponent of a zero argument. Sets DVZ (division-by-zero) flag (-7)."

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
50g - Exponent of zero - Claudio L. - 09-27-2017, 04:28 PM
RE: 50g - Exponent of zero - Arno K - 09-27-2017, 05:28 PM
RE: 50g - Exponent of zero - Claudio L. - 09-27-2017, 07:58 PM
RE: 50g - Exponent of zero - Joe Horn - 09-27-2017 08:20 PM
RE: 50g - Exponent of zero - Arno K - 09-27-2017, 08:31 PM
RE: 50g - Exponent of zero - BarryT - 09-28-2017, 09:37 AM
RE: 50g - Exponent of zero - Arno K - 09-28-2017, 10:17 AM
RE: 50g - Exponent of zero - Claudio L. - 09-28-2017, 05:19 PM
RE: 50g - Exponent of zero - BarryT - 09-28-2017, 09:39 PM
RE: 50g - Exponent of zero - Vtile - 09-28-2017, 11:10 PM
RE: 50g - Exponent of zero - AlexFekken - 09-28-2017, 11:45 PM
RE: 50g - Exponent of zero - AlexFekken - 09-29-2017, 12:06 AM



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