Appendix B. Numerics
This appendix covers some common issues and questions about numbers in programming. These topics are not entirely unique to Julia; for instance, I will discuss what happens if the result of an integer arithmetic operation results in a higher or lower number than can be represented by the integer type. I will also discuss why floating-point numbers, unlike integers, are inaccurate.
B.1 Different number types and their bit lengths
A number is not just a number. There are different types of numbers, such as integers, real numbers, irrational numbers, and so on. For example, integers are whole numbers, such as 2, 7, 43, 820, -52, 0, 6, and -4, while real numbers contain numbers that have a decimal point, such as 3.45, 0.042, ...
Get Julia as a Second Language now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.