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,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top