O'Reilly logo

Common Lisp Recipes: A Problem-Solution Approach by Edmund Weitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4. Numbers and Math

Out of the box, COMMON LISP is exceptionally well suited to numerical mathematical calculations. Integers are not limited to a specific size (see Recipe 4-1). It comes with rational numbers so you can do arithmetic with unlimited precision (see Recipe 4-5). And it has complex numbers (see Recipe 4-8).

All of these numerical types are part of the standard and thus not only available in every COMMON LISP implementation but also fully integrated into the language. This chapter will look at them in detail—how they are used, how they can be printed and parsed, and what to look out for. It’ll also discuss arbitrary precision floats (see Recipe 4-7), which aren’t part of the standard but can be added with the help of a library. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required