![]() | |
![]() |
| | Thread Tools | Display Modes |
#41
| |||
| |||
|
|
Or it reserves one digit for the sign.. Shakespeare |
#42
| |||
| |||
|
|
"Shakespeare" <whatsin (AT) xs4all (DOT) nl> wrote Or it reserves one digit for the sign.. Shakespeare I don't think so, because a NUMBER(1) column can take negative values, i.e. values from -9 to +9. Here are some more findings I've just made, in the C domain: --- Additionally, In C domain, you start losing the 6th place right of the point after the number to the left of the D.P. exceeds about 2^33=8589934592: TVTime=(double)8589934590.123456; -> TVTime=8589934590.123456 TVTime=(double)8589934591.123456; -> TVTime=8589934591.123456 TVTime=(double)8589934592.123456; -> TVTime=8589934592.123455 <-- Loss starts now. TVTime=(double)8589934593.123456; -> TVTime=8589934593.123455 TVTime=(double)8589934594.123456; -> TVTime=8589934594.123455 So with a C double, you can't represent a FULL 16 digits in decimal, i.e. you can't represent 9999999999.123456 without losing precision at the right. I guess that's why Pro*C plays safe and rounds to 15 places. --- Martin |
#43
| |||
| |||
|
|
"Shakespeare" <whatsin (AT) xs4all (DOT) nl> wrote Or it reserves one digit for the sign.. Shakespeare I don't think so, because a NUMBER(1) column can take negative values, i.e. values from -9 to +9. Here are some more findings I've just made, in the C domain: --- Additionally, In C domain, you start losing the 6th place right of the point after the number to the left of the D.P. exceeds about 2^33=8589934592: TVTime=(double)8589934590.123456; -> TVTime=8589934590.123456 TVTime=(double)8589934591.123456; -> TVTime=8589934591.123456 TVTime=(double)8589934592.123456; -> TVTime=8589934592.123455 <-- Loss starts now. TVTime=(double)8589934593.123456; -> TVTime=8589934593.123455 TVTime=(double)8589934594.123456; -> TVTime=8589934594.123455 So with a C double, you can't represent a FULL 16 digits in decimal, i.e. you can't represent 9999999999.123456 without losing precision at the right. I guess that's why Pro*C plays safe and rounds to 15 places. --- Martin |
#44
| |||
| |||
|
|
"Shakespeare" <whatsin (AT) xs4all (DOT) nl> wrote Or it reserves one digit for the sign.. Shakespeare I don't think so, because a NUMBER(1) column can take negative values, i.e. values from -9 to +9. Here are some more findings I've just made, in the C domain: --- Additionally, In C domain, you start losing the 6th place right of the point after the number to the left of the D.P. exceeds about 2^33=8589934592: TVTime=(double)8589934590.123456; -> TVTime=8589934590.123456 TVTime=(double)8589934591.123456; -> TVTime=8589934591.123456 TVTime=(double)8589934592.123456; -> TVTime=8589934592.123455 <-- Loss starts now. TVTime=(double)8589934593.123456; -> TVTime=8589934593.123455 TVTime=(double)8589934594.123456; -> TVTime=8589934594.123455 So with a C double, you can't represent a FULL 16 digits in decimal, i.e. you can't represent 9999999999.123456 without losing precision at the right. I guess that's why Pro*C plays safe and rounds to 15 places. --- Martin |
#45
| |||
| |||
|
|
"Shakespeare" <whatsin (AT) xs4all (DOT) nl> wrote Or it reserves one digit for the sign.. Shakespeare I don't think so, because a NUMBER(1) column can take negative values, i.e. values from -9 to +9. Here are some more findings I've just made, in the C domain: --- Additionally, In C domain, you start losing the 6th place right of the point after the number to the left of the D.P. exceeds about 2^33=8589934592: TVTime=(double)8589934590.123456; -> TVTime=8589934590.123456 TVTime=(double)8589934591.123456; -> TVTime=8589934591.123456 TVTime=(double)8589934592.123456; -> TVTime=8589934592.123455 <-- Loss starts now. TVTime=(double)8589934593.123456; -> TVTime=8589934593.123455 TVTime=(double)8589934594.123456; -> TVTime=8589934594.123455 So with a C double, you can't represent a FULL 16 digits in decimal, i.e. you can't represent 9999999999.123456 without losing precision at the right. I guess that's why Pro*C plays safe and rounds to 15 places. --- Martin |
#46
| |||
| |||
|
|
TVTime=(double)8589934590.123456; -> TVTime=8589934590.123456 TVTime=(double)8589934591.123456; -> TVTime=8589934591.123456 TVTime=(double)8589934592.123456; -> TVTime=8589934592.123455 <-- Loss starts now. TVTime=(double)8589934593.123456; -> TVTime=8589934593.123455 TVTime=(double)8589934594.123456; -> TVTime=8589934594.123455 |
#47
| |||
| |||
|
|
TVTime=(double)8589934590.123456; -> TVTime=8589934590.123456 TVTime=(double)8589934591.123456; -> TVTime=8589934591.123456 TVTime=(double)8589934592.123456; -> TVTime=8589934592.123455 <-- Loss starts now. TVTime=(double)8589934593.123456; -> TVTime=8589934593.123455 TVTime=(double)8589934594.123456; -> TVTime=8589934594.123455 |
#48
| |||
| |||
|
|
TVTime=(double)8589934590.123456; -> TVTime=8589934590.123456 TVTime=(double)8589934591.123456; -> TVTime=8589934591.123456 TVTime=(double)8589934592.123456; -> TVTime=8589934592.123455 <-- Loss starts now. TVTime=(double)8589934593.123456; -> TVTime=8589934593.123455 TVTime=(double)8589934594.123456; -> TVTime=8589934594.123455 |
#49
| |||
| |||
|
|
TVTime=(double)8589934590.123456; -> TVTime=8589934590.123456 TVTime=(double)8589934591.123456; -> TVTime=8589934591.123456 TVTime=(double)8589934592.123456; -> TVTime=8589934592.123455 <-- Loss starts now. TVTime=(double)8589934593.123456; -> TVTime=8589934593.123455 TVTime=(double)8589934594.123456; -> TVTime=8589934594.123455 |
![]() |
| Thread Tools | |
| Display Modes | |
| |