HP Forums

Full Version: (38G) COMB Replacement to Avoid COMB a<b Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The programme takes an complex number

(a,b)

from Home screen Ans & returns the result of

COMB(a,b)

to Ans, the answer differing from the result of in-built function COMB for the case where

a<b

the function COMB resulting in an error, while this programme returns

0.

Motivation: From the 49G on the function COMB returns 0 for a<b, a result I find more comfortable than error.

Code:
COMB0

IFERR
COMB(RE(Ans),IM(Ans)):
THEN
0:
END:
Reference URL's