In this book, we largely focus on performance; that is, how to make your computations faster. However, it probably goes without saying that it does not matter how fast a function returns, if it returns the wrong result. At some point, accuracy has to override performance.
The Julia compiler and standard library has been written with particular attention to the accuracy of numerical operations. All basic floating point arithmetic in Julia follows strict IEEE 754 semantics. Rounding is handled carefully in all base library code to guarantee the theoretical best error limits. Basic mathematical operations and functions are guaranteed to be accurate to within 1 ULP.Â
However, algorithms do not always require the full precision of the IEEE rules, and demand higher performance. In these situations, it is possible to trade some accuracy for performance...