double and precision

K

Knackeback

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.23456789012345
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 "siginificant count of digits <= 15"
and the resulting sum has also this limitation ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top