Complex Number Error
HP HP Calculator
Severity: MinorWhat Does This Error Mean?
HP calculator complex number error means an operation produced a complex (imaginary) result but the calculator is in real-only mode. On the HP 50g, switch to Complex mode via MODE → Complex. On the HP Prime, use the CAS for complex operations or enter the complex number with the i key.
Affected Models
- HP 50g
- HP Prime (G1 and G2)
- HP 35s
- HP 48G / HP 48GX
Common Causes
- Taking the square root of a negative number in real mode — result is imaginary
- Inverse trig function applied to a value outside the -1 to 1 range — e.g. arcsin(2)
- HP 50g in real mode (R flag 103 not set) — complex results raise an error
- Logarithm of a negative number in real mode
- HP Prime Home mode calculating operations that have complex results outside the real domain
How to Fix It
-
Enable Complex mode on HP 50g.
Press LEFT-SHIFT → MODE → Complex flag. This sets flag -103 which allows the HP 50g to return complex results instead of raising an error. Alternatively, enter complex numbers in ordered pair format: (real, imaginary).
-
Use the CAS on HP Prime for complex operations.
The HP Prime CAS handles complex numbers natively. Press CAS (the white CAS button), then perform the calculation. SQRT(-4) in CAS returns 2*i. In the Home view, the same operation may return an error depending on the CAS settings.
-
Check whether the input value is in the expected domain.
For arcsin and arccos, the input must be between -1 and 1. For arctan, any real value is valid. For square root, the input must be non-negative in real mode. If your input is outside these ranges, double-check the preceding calculation.
-
Use the i key for direct complex entry.
On HP 50g: enter complex numbers as (3, 4) meaning 3 + 4i. On HP Prime: use the dedicated i key (or type i) for imaginary unit. For example, type '2 + 3*i' to enter a complex number in algebraic entry.
Frequently Asked Questions
How do I convert between rectangular and polar complex form on HP 50g?
With a complex number on the stack in the form (a, b), press R→P to convert to polar form (magnitude, angle). Press P→R to convert back to rectangular. The angle unit (degrees/radians) follows the current angle mode.
Why does the HP 35s not support complex number results?
The HP 35s does not have a complex number operating mode. It will always return an error for operations that produce complex results. For complex calculations, use the HP 50g or HP Prime which have full complex arithmetic support.