What is the best way to rationalize complex numbers, if not both the real and imaginary part are actually rational?
According to the documentation, Rationalize
works on complex numbers, but apparently only when both the real and the imaginary part can be rationalized, for example
Rationalize[N[4/3 + I 2/3]]
(*4/3 + I 2/3*)
However, Rationalize[N[4/3 + I Sqrt[2]/3]]
is not simplified, whereas I would like it to return 4/3 + I 0.471405
.
Thanks.
4/3 + I N[ Sqrt[2]/3]
is immediately and automatically converted to1.33333 + 0.471405 I
, I don't see how it can be done. $\endgroup$HoldForm
will do for me. $\endgroup$