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: 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: Glaring Excel calc bug.
... referring to the conversion issues. ... Using BCD does not eliminate the issues of finite precision arthmetic, ... math, instead of having to do binary conversions? ... You get 0 from =1.01-1-0.01 (removing the parentheses) because Excel is ... (microsoft.public.excel) - Re: Numerical accuracy of C++ and Fortran programs on 32 bit machines
... low-order binary digits are set to zero which results in the case as ... is "more" correct than the zero lower significant binary digits. ... The lesson is, if in Fortran one wants full double precision, specify it ... conversion of a decimal number does not ... (comp.programming) - Re: Problem with printf formats
... Let P equal the precision if nonzero, 6 if the precision is omitted, or 1 if the precision is zero. ... if a conversion with style E would have an exponent of X: ... Finally, unless the # flag is used, any trailing zeros are removed from the fractional portion of the result and the decimal-point character is removed if there is no fractional portion remaining. ... (comp.lang.c) |
|