Re: compilation problem with module function interface definition



James Giles wrote:

(snip)

My own preprocessor treats KINDless literals as type RATIONAL.
Mixed mode between RATIONAL and REAL gives a REAL result
of the appropriate precision.  So, 1.23 is *EXACTLY* 123/100,
which is then converted to REAL of the same precision as X when
the above assignement is done.  (The actual conversion is done
in the preprocessor in this case since the argument to the conversion
is a statically known.)

Maybe in a few years decimal floating point will get popular, and this problem will go away. That is, 1.23 will be exactly 1.23, single or double precision. There are people working on an efficient float decimal system.

-- glen

.



Relevant Pages

  • Re: double to int conversion yields strange results
    ... giving me two different values for the int. ... the question raised is not about the precision of the ... is done in extended precision. ... It is the conversion to 'double' before the conversion to 'int' that ...
    (comp.lang.c)
  • Re: printf and style g
    ... a G conversion specifier), ... Let P equal the precision if nonzero, ... if a conversion with style E would have an exponent ... formatting and a precision of 2. ...
    (comp.std.c)
  • Re: double money
    ... precision in decimal due to this "wobbling precision". ... -- way faster conversion between external decimal and internal form ... -- exact representation of decimal fractions ... People seldom notice the loss of a bit or two of precision -- ...
    (comp.lang.c)
  • Re: printf and style g
    ... Let P equal the precision if nonzero, ... if a conversion with style E would have an exponent ... So I don't think an additional clarifying condition is necessary ...
    (comp.std.c)
  • Re: %a in printf
    ... where there is one hexadecimal digit (which is ... precision; if the precision is missing and FLT_RADIX ... used for a conversion and the letters ABCDEF for A ... If the value is zero, ...
    (comp.lang.c)