Lisp is a family of programmable programming languages.
2
votes
3answers
898 views
(Common Lisp) Print an Integer and its Digits Reversed
This common lisp program is an exercise to print an integer and its digits reversed to the screen.
(defun read-number () (format t "Enter a number: ~%") (read))
(defun reverse-string ...
1
vote
2answers
415 views
(Scheme) Use Newton's Method to compute sqrt(x)
Given the following task:
Use Newton's method to compute the square root of a number. Newton's method involves successive approximation. You start with a guess, and then continue averaging ...
1
vote
1answer
136 views
(Common Lisp) Find epsi
4.2 Machine Epsilon. Find the floating point number epsi that has
the the following properties:
1.0+epsi is greater than 1.0 and
Let m b e any number less than epsi. Then 1.0+m is ...
0
votes
1answer
111 views
(Scheme) [SICP ex. 2.40] unique-pairs
From the section called Nested Mappings
Exercise 2.40. Define a procedure
unique-pairs that, given an integer n,
generates the sequence of pairs (i,j)
with 1< j< i< n. Use ...