This chapter covers
- Working with integers, floating-point numbers, and fractions
- Using variables to store long numbers
- Create reusable calculations by defining functions
- The most basic types in Julia
Even if you never end up using Julia as your primary language, you may still value it as a replacement for your desk calculator. Julia can even double as an advanced high-school graphing calculator (figure 2.1). As a bonus, it’s completely free to use.
Remember you have to walk before you can run, and exploring numbers is a great way to get introduced to the core concepts of Julia. Since Julia is not just a general-purpose programming language but specifically tailored towards numerical computing, manipulating numbers plays a unique role in Julia.
Figure 2.1 Retro scientific calculator. Can we replace the usage of a handheld calculator with a Julia REPL?
In this chapter, you will look at the aspects of Julia that let you do the same kinds of things in Julia that you would do with a calculator. Of course, you may object that you don’t intend to use Julia as a calculator, but this is simply a way to give you the foundation to understand the more complex topics.