double and precision

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Knackeback

    double and precision

    I use data type double at 32Bit platform and from
    float.h I learn:

    /* Number of decimal digits of precision in a double */
    #undef DBL_DIG
    #define DBL_DIG 15

    My questions:
    Are numbers like 3, 5.45, 1.2345678901234 5
    i.e. numbers with siginificant count of digits <= 15
    precise in a mathematical sense ?

    If so I can add this numbers without rounding error as
    long as I do not exceed the siginificant count of digits
    limit 15.
    Right?

    To be utterly clear:
    Must I expect rounding errors if I only add numbers n
    with the property "siginifica nt count of digits <= 15"
    and the resulting sum has also this limitation ?

Working...