[Rd] Inaccurate complex arithmetic of R (Matlab is accurate)

Tom Short tshort.rlists at gmail.com
Tue Aug 4 16:33:50 CEST 2009


I checked, and both octave and yorick use multiplication for z^i where
i is an integer, leading to better accuracy. Octave uses an integer
power if it's stored as a double if it's close enough to an integer.
See:

http://hg.savannah.gnu.org/hgweb/octave/file/fb22dd5d6242/src/xpow.cc
http://yorick.sourcearchive.com/documentation/2.1.01cvs20060706/ops2_8c-source.html

- Tom



More information about the R-devel mailing list