1.4 KiB
1.4 KiB
Hints
General
- It might be useful to have a list of all of the numeric operations in Lisp. – you can find a full list here
1. A Dough Ratio
- Common Lisp has a built-in constant for π (pi)
- When it comes to rounding, the CL spec provides a smattering of functions
2. A Splash of Sauce
- There is a built-in operator that might help you take the square-root of a number
3. Some Cheese, Please
- For squaring or cubing numbers, there is a built-in exponentiation function
- You might want to take a look at this page of rounding operations and check out some of the alternatives to
round
.
4. A Fair Share
- This part requires using a function you may not have come across before, the modulo
function (
mod
). This function gives you the remainder of the division between two numbers. - For comparing the result of
mod
to another number, this page of comparison operators.