accuracy of float^(integer / 2)



To compute float^(integer /2), Maxima does sqrt(float)^n. (To verify this, trace the CL function exptb.)  One test
(using GCL and Clozure) shows that this method is less accurate than (expt float (/ integer 2)); for example:

(%i1) fpprec : 2000$

(%i2) e : 2.0b0^(183/2)$

(%i3) float(e);
(%o3) 3.501423185924134*10^27

(%i4) :lisp(setf $f (expt 2.0d0 (/ 183 2)))
3.501423185924134E27

(%i4) g : 2.0^(183/2);
(%o4) 3.5014231859242049*10^27

(%i5) float(abs(f-e)/e);
(%o5) 6.8358086576619232*10^-17

(%i6) float(abs(g-e)/e);
(%o6) 2.0322550803597316*10^-14

Changing the exponent from 91.5 to 91.501 gives the same value for f and g. Let me guess that in the 60s and 70s,
the sqrt(float)^n method was more accurate and faster than (expt float (/ integer 2)).

--Barton