[Openmcl-devel] Floating point precision
R. Matthew Emerson
rme at clozure.com
Sat Jan 17 13:40:37 EST 2009
On Jan 17, 2009, at 8:18 AM, Sudhir Shenoy wrote:
> Sorry if this is slightly off topic but is there any way (CL standard
> or CCL specific) to make all floating point computations in double
> precision? I.e., to ensure that (sqrt 1/3) will return the same value
> as (sqrt 1/3.0d0) by default (without having to do (sqrt (coerce 1/3
> I have tried web searches and can't find an answer to this question so
> I suspect that there is no standard way but would be grateful if
> someone can point me to even a CCL-specific method.
I don't believe there is any CL-standard way to do that.
The CL spec requires that either an accurate rational result or single-
float approximation be returned when a SQRT gets a rational argument.
More information about the Openmcl-devel