A double data type cannot correctly represent some base values of 10. This is because floating point numbers represent real numbers. This means that when representing monetary values, a decimal value type should be used to prevent errors. (feel free to correct errors in this preamble)
What I want to know are the values that represent such a problem under the dual data type in 64-bit architecture in the standard .NET framework. (C # if that matters)?
I expect the answer to be a formula or rule to find such values, but I will also like some approximate values.
Any number that cannot be written as the sum of positive and negative powers of 2 cannot be accurately represented as a binary floating-point number.
IEEE 32- 64- ; , . , ( +/- 10 ^ 308 (-10), ) , . , 64- 2 52, , 2 ^ 52, 't 2 ^ -1.
, , 1/3, 2/3, 1/5.
1/3
2/3
1/5
( ) , , , , - . , , 0.
0
. .
, N ( 0) N * 2 ^ I, N * 2 ^ (- I).
, 5.625 ( 10) 101.101 ( 2).
, 2 ^ (- I) I, double.
, , double, . , , - . , , , , , .
double
, , : " ?" , , . , "" , " ", ..
s, e m
s
e
m
s * m * 2^e
, , ( s, e m), .
Basically, you can represent all the numbers between 0and 2^53 - 1multiplied by a certain power in two (possibly negative power).
2^53 - 1
As an example, you can specify all the numbers between 0and 2^53 - 1multiplied by 2^0 = 1. And you can also represent all of these numbers by dividing them by 2(using a fragment .5). Etc.
2^0 = 1
2
.5
This answer does not fully cover the topic, but I hope this helps.