Complex numbers support in HCFrom version 0.8, HC supports calculations with complex numbers.
All the standard functions that apply to complex numbers work with complex numbers. These calculations are, as all other calculations, in high precision, with the help of the MAPM library and the MAPMX complex numbers wrapper.
Graphs of complex numbers are not supported as of now though.
SyntaxComplex numbers are inputted and outputted with this syntax: real_partiimaginary_part For example, 5 + 3i would be written as
5i3in HC. This format is inspired by the J programming language.
As another example, you can try to type
sqrt(-1)in HC. The result given will be:
Other notes* Trigonometry functions will refuse to work with complex numbers unless you are in RAD mode (switch to it by typing "\rad" in HC).
* You cannot type a non-number as the real part or imaginary part. Therefore, you cannot write something like 0ipi, if you wanted to have a number pi*i. To express this number you would have to use something like: