Complex and Rational Numbers
Complex and Rational Numbers
Julia ships with predefined types representing both complex and rational numbers, and supports all standard Mathematical Operations and Elementary Functions on them. Conversion and Promotion are defined so that operations on any combination of predefined numeric types, whether primitive or composite, behave as expected.
Complex Numbers
The global constant im
is bound to the complex number i, representing the principal square root of -1. It was deemed harmful to co-opt the name i
for a global constant, since it is such a popular index variable name. S