- Code: Select all
`(setf *float-format* "%.1000g")`

(print pi)

; returns 3.141592653589790007373494518105871975421905517578125

The actual value of PI is:

3.141592653589793238462643383279502884197169399375105...

so the value returned by Nyquist is

*only*accurate to 14 decimal places.

3.14159265358979

- Code: Select all
`(setf *float-format* "%.1000g")`

(print (- pi 3.14159265358979))

; returns 0

The binary representation of 3.141592653589790007373494518105871975421905517578125 is

01000000010010010000111111011011

The binary representation of 3.14159265 is

01000000010010010000111111011011

Note that these two binary numbers are identical. So in this particular case, digits beyond 8 decimal places are irrelevant.