precision: the compiler may store intermediate
results and round them to double while keep
other parts in higher precision.
-So (a+b)==(a+b) may be false when the two sides
+So
+<pre>
+(a+b)==(a+b)
+</pre>
+may be false when the two sides
are kept in different precision.
(This is not an x87 specific problem, it matters whenever there
is a higher precision fp type than the currently used one.
when a result is stored in a variable or a
type cast is used, then it is guaranteed that
the precision is appropriate to that type.
-So in (double)(a+b)==(double)(a+b) both
-sides are guaranteed to be in double precision
+So in
+<pre>
+(double)(a+b)==(double)(a+b)
+</pre>
+both sides are guaranteed to be in double precision
when the comparision is done.
<p>
(This still does not solve the x87 double rounding
<li>Complex arithmetics
<p>
-With gcc x*I turns into (x+0*I)*(0+I) = 0*x + x*I,
-so if x=inf then the result is nan+inf*I instead of inf*I
+gcc turns
+<pre>
+x*I
+</pre>
+into
+<pre>
+(x+0*I)*(0+I) = 0*x + x*I
+</pre>
+So if x=inf then the result is nan+inf*I instead of inf*I
(an fmul instruction is generated for 0*x)
<p>
-(There were various complex constant folding issues as well).
+(There were various complex constant folding issues as well in gcc).
<p>
So a+b*I cannot be used to create complex numbers,
instead some double[2] manipulation should be used to