[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

precision, accuracy, and floating conversion (GJC's comment)



    Date: Mon, 27 Jan 86 11:52:37 PST
    From: fateman@dali.berkeley.edu (Richard Fateman)

    ...

    As for GJC's example, if I understand it, you want a floating point
    number so you can return (the float (* 1/2 ...))  or (* (the float 1/2) ...)

Technical nit: I think these expressions should be
	(float (* 1/2 ...))  or (* (float 1/2) ...)
to be correct.  On the other hand, I think that GJC really wanted was
to write a constant at the bottom of the coercion chain so that the type
of the argument would determine the type of the answer.  Hence
	(coerce (* 1/2 ...) (type-of arg))  or (* (coerce 1/2 (type-of arg)) ...)
would do.