Significant digits and complex numbers
Significant digits and complex numbers
(OP)
I am running into some difficulty formatting the numbers that come out of manipulation of complex numbers. In order to do the mathematical computations, I have to break a complex number down to do operations on the imaginary and real components separately.
When I return to complex notation, the number of significant digits is untenable. I cannot get any of the built in number formats to change the way the number is displayed.
For information, I am starting with a number like:
3E-002+3.6E-002i which is displayed using the formula: =COMPLEX(0.03,0.036,"j")
In order to do unit conversion on these numbers, however, I am using the formula:
=COMPLEX((IMREAL(B22)*5.28/C17),IMAGINARY(B22)*5.28/C17,"j")
this is where I get the insane number of significant digits.
How can I bring the results down to 2 or 3 significant digits?
Any suggestions on how to better handle complex numbers would also be appreciated.
Thanks!
When I return to complex notation, the number of significant digits is untenable. I cannot get any of the built in number formats to change the way the number is displayed.
For information, I am starting with a number like:
3E-002+3.6E-002i which is displayed using the formula: =COMPLEX(0.03,0.036,"j")
In order to do unit conversion on these numbers, however, I am using the formula:
=COMPLEX((IMREAL(B22)*5.28/C17),IMAGINARY(B22)*5.28/C17,"j")
this is where I get the insane number of significant digits.
How can I bring the results down to 2 or 3 significant digits?
Any suggestions on how to better handle complex numbers would also be appreciated.
Thanks!





RE: Significant digits and complex numbers
RE: Significant digits and complex numbers
RE: Significant digits and complex numbers
I've just spent 10 minutes messing about with it, and the only approach I can see that seems to have a chance is to write your own display function, separate from the actual calculated result.
The complex number you want to format is in c23
d23=IMREAL(C23)
d24=imaginary(c23)
d25=text(d23,"0.00")&"+"&text(d24,"0.00")&"j"
Then you can hide the original result (c23, d23,d24 in this case).
Very ugly!
Cheers
Greg Locock
RE: Significant digits and complex numbers
By the way, I have no complex handling functions in my Excel 2000 installation: is this an add-on or what?
prex
motori@xcalcsREMOVE.com
http://www.xcalcs.com
Online tools for structural design
RE: Significant digits and complex numbers
For Prex: You are correct. The complex number functions are included in the Analysis Toolpak Add-in.
I just tried the custom formatting, and Excel seems to ignore that.
I will give these suggestions a shot. The intermediate formatting step may work, but I will also try writing a VB function and see if I can control the variable type that I pass back out.
Thanks for the advice, and I will give feedback when I get the chance to try these hints.
Regards,
Kraigb
RE: Significant digits and complex numbers
Thanks to all for their suggestions and responses on this!
Kraigb