On 06/22/2013 10:21 PM, Richard Fateman wrote: > On 6/22/2013 8:40 AM, Christoph Lhotka wrote: >> Dear mathgroup, >> >> there is indeed a very elegant solution to these kind of problems. >> It took >> me some while (looking up the documentation center) but I think this >> works fine: > Well, there are lots of little problems with this solution, some of > which have to do > with the semantics of N, so that 1/2+2I looks like floats, and > 2^5000+2I looks like > 1.4124...x10^1505 + 0. I. with a red box around the 0. >
of course my definition of format did not take your cases into account (it was meant to work on realistic approximate complex numbers), but for sure you can modify the definition to satisfy your needs.
> but also there is an issue that FullForm[%] is peculiar. >
FullForm works as expected, also pattern matching works (in terms of the interpreted expression).
> So the idea of changing the display format in $Post processing is a > possibility, > it rapidly becomes less elegant if you expect it to cover every > eventuality, and > probably not possible if you want FullForm to work. > RJF >
I think, that you did not see the main point. It is not the definition of format it is the mechanism that allows to implement any output format in terms of interpreted expressions.
Here I merge your approach of a previous post with mine to work in a more elegant way: