Re: What's new in lcc-win



jacob navia <jacob@xxxxxxxxxx> writes:

Ben Bacarisse wrote:
<snip>
You also seem to have fixed the missing definition of _Complex_I and
the types of creal and cimag.


Yes, and now, (as a side effect) you can't use
creal(z) = 5;

You could always make casts produce modifiable lvalues -- as an
extension.

In the long-run, don't you want to have complex numbers
whose components are the smallest allowable size? I.e. don't you want
float _Complex to use two floats?

The official syntax is

z = 5 + cimag(z); // Assigns 5 to real part
z = creal(z) + 5*I; // Assigns to the imaginary part.

I remember doing quote a bit of scientific programming a long time
ago, and modifying the parts of complex number was not a common thing
to do. I may be wrong about that, but I would not worry about it.

--
Ben.
.



Relevant Pages

  • Re: What is a type?
    ... jacob navia wrote: ... complex types are "available in C99", ... given the sizes of float, double, and long double). ... Reading email is like searching for food in the garbage, ...
    (comp.lang.c)
  • Re: The machine epsilon
    ... jacob navia wrote: ... "For the standard types (float, double and long double) this defines ... in some alphabets" - X3.4, ...
    (comp.lang.c)
  • Re: float? double?
    ... jacob navia wrote: ... I've readed some lines about the difference between float and double ... Note the word precision here. ... Precision means the number of significant digits you get ...
    (comp.lang.c)