On Fri, 07 Mar 2014 10:54:58 EST Bradley Lucier lucier@math.purdue.edu wrote:
On 03/07/2014 10:53 AM, Pierpaolo Bernardi wrote:
High quality implementations will return exact answer when possible. Another example is the square root of an exact square: try (sqrt 4) in various implementations, or (sin 0), or other special angles.
Try (sqrt +2i) or (expt -1 1/3) in Gambit ;-).
Shouldn't it return all the roots? :-)
Been meaning to ask:
(expt +nan.0 0)
1
(expt 1 +nan.0)
+nan.0
This seems to be at least inconsistent. Seems to me both should return 1
(expt nan 0.0)
+nan.0
(expt 1.0 nan)
+nan.0
These seem fine.
But I am not a mathematician.