Julia has a wealth of built-in numeric types, which users can make use of in order to achieve maximum time and memory efficiency of computations. Also, when writing methods, it is advisable to choose the most general numeric type to which a given method applies. However, it is hard to easily grasp the entire hierarchy of types. In this recipe, we show how you can explore the entire tree of base numeric types in Julia. Additionally, you will learn how to work with the type hierarchy in Julia.
The recipe is generic and can be applied to any other type.
Numeric types are the basic building blocks of any program. Julia provides a vast range of integer and floating-point numbers. In this recipe, you will inspect their hierarchy.