Skip to content
Prev 36280 / 63424 Next

print(big+small*1i) -> big + 0i

On Wed, 24 Mar 2010, William Dunlap wrote:

            
'significant digits' is documented in ?signif and xref-ed in ?print.
So, yes, the are 'printed to the same precision' for the definition 
given of 'precision'.  (One can argue that precision is relative to 
the modulus, but this definition is a close approximation.)
o	Printing of complex numbers could misbehave when one of the
 	parts was large (so scientific notation was used) and the
 	other was so much smaller that it had no significant digits
 	and should have been printed as zero (e.g. 1e80+3e44i).

and 2.2.0

     o	signif() on complex numbers now rounds jointly to give the
 	requested number of digits in the larger component, not
 	independently for each component.
...