I have to think every time which "short" number is in the equivalence group.
For example, it is not clear to me which of these numbers is greater or less than 0.3.
Displaying strings at maximum accuracy (17 s.f) for doubles hurts, because the format cannot represent real numbers very accurately. So, a shortest precise string hides those tiny representation errors from the user, and at the same time preserves the accuracy (roundtrip string -> double).
We have a financial application that receives prices in decimal notation. Therefore, it is wrong when the terminal received a "short" price, and the debugger shows its "long" equivalent.
It is clear that the "short" and "long" representations are the same number. But at the entrance to the financial program from other market participants, it was precisely the "short" form that was delivered, as the initial form of filling in by a person who thinks in the decimal number system.
We have a financial application that receives prices in decimal notation. Therefore, it is wrong when the terminal received a "short" price, and the debugger shows its "long" equivalent.
It is clear that the "short" and "long" representations are the same number. But at the entrance to the financial program from other market participants, it was precisely the "short" form that was delivered, as the initial form of filling in by a person who thinks in the decimal number system.
Even for the experienced programmers!
That is why Microsoft debugger adopted the shortest form, although the longest 17 significant digits (%.17g) is extremely accurate.
In general, there were enough arguments in favor of the fact that the debugger should show the "shortest" number from its equivalence group, and not the average.
fxsaber #: In general, there were enough arguments in favor of the fact that the debugger should show the "shortest" number from its equivalence group, and not the average.
Yes it is the average: as equivalence group extends from representable floating point number +/- half epsilon on both directions. The representable fp number lies in the middle of the group.
I am facing the same resistance for change :-) like the first time I reported the bug in string conversion before. Now, the display of doubles from Print(), string(), Alert(), FileWrite() and dialogue boxes are fixed.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I have to think every time which "short" number is in the equivalence group.
For example, it is not clear to me which of these numbers is greater or less than 0.3.
Displaying strings at maximum accuracy (17 s.f) for doubles hurts, because the format cannot represent real numbers very accurately. So, a shortest precise string hides those tiny representation errors from the user, and at the same time preserves the accuracy (roundtrip string -> double).
Even for the experienced programmers!
That is why Microsoft debugger adopted the shortest form, although the longest 17 significant digits (%.17g) is extremely accurate.although the longest 17 significant digits (%.17g) is extremely accurate.
They are not accurate, because are equal to (min+max)/2 of their equivalence group.
Display the binary value, do not get confused by the debugger output. This is a side effect of the %.17g display. You can re-test with Print().
In general, there were enough arguments in favor of the fact that the debugger should show the "shortest" number from its equivalence group, and not the average.
Yes it is the average: as equivalence group extends from representable floating point number +/- half epsilon on both directions. The representable fp number lies in the middle of the group.
I am facing the same resistance for change :-) like the first time I reported the bug in string conversion before. Now, the display of doubles from Print(), string(), Alert(), FileWrite() and dialogue boxes are fixed.
I will not add more to this post.
Thanks fxsaber!
Thanks fxsaber!
I am also grateful to you, because You proved me wrong in the first place.