This is a follow-up.
There is a very similar question.
It is well known that similarity tests for two floating-point values x and y appear like this Should:
Ab ( x - y ) & lt; Epsilon & nbsp; & Nbsp ;, & nbsp; & Nbsp; Epsilon has some very low value.
How can I select a value for epsilon ?
It would be better to choose for epillon , small value as possible to obtain the highest possible precision for parity test.
For example, the NAT framework provides a continuous system.double.appilon (= & nbsp; 4.94066 and many times; 10 -324 ) , Which repeats the small positive system. Value is greater than zero.
However, it has been found that this particular value can not be used as epilon because:
0 ; +
system.double.appealon≠ & nbsp; 01 & nbsp; +
System.Double.Epsilon= & nbsp; 1 & nbsp; (!)
Which is, if I understand correctly, because that is less stable.
and rarr; Is it true?
& rarr; Does it also mean that I can use the epicilon: machine epiciline for equality tests?
These two questions have been removed because they have already been adequately answered before the other SO questions related earlier.
Linked-to Wikipedia article says that 64-bit floating-point numbers (such as double type in many languages) , The machine is equivalent to epsilon:
2 -53 , & nbsp; Or approximately 0.000000000000000111 (a number with 15 numbers after a decimal point)
& rarr; Does it adhere to the fact that all 64-bit floating point values are guaranteed to be accurate for 14 (if not 15) points?
No one can know what calculation your application is and how Exact You expect your results since the amount of spherical errors Machine Epislon will be very large all the time, so you have to choose your own value . Depending on your needs, 0.01 would be sufficient, or perhaps .00000000000001 or less.
The question, Are you sure you floating like to / would point to test equality values ? Maybe you should redesign your algorithm.
Comments
Post a Comment