<div dir="ltr"><br><br>On Friday, March 7, 2014 3:24:06 PM UTC-6, Andrew Barnert wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="auto"><blockquote type="cite"><div><div dir="ltr"><div><div><span style="font-size:13px">It is not possible to correctly promote a binary float to a decimal float. The decision (in Py2.7?)</span></div><div><span style="font-size:13px">was to NOT throw an exception and to copy the binary float "exactly" into the decimal float.</span></div></div></div></div></blockquote><div><br></div><div>There is no such thing as copying a binary float exactly into a decimal float. Decimal float values are not a superset of binary float values; in either direction, you have to round. Which is what Python 2.7+ does.</div><div><br></div></div></blockquote><div><br></div><div>Andrew, you are deliberately side-stepping the point. You apparently disagree with Steven D, and others,</div><div>who have already stated repeatedly on this list that on 2.7+ binary float literals are copies "exactly" to</div><div>decimal float representation! That is what is causing this entire problem, sir. That is the reason for this:</div><div><div>>>> from decimal import Decimal</div><div>>>> Decimal(.1)</div><div>Decimal('0.1000000000000000055511151231257827021181583404541015625') <====== this is not a rounding problem</div><div>>>> </div></div><div> </div><div>It is a copy problem, and it should not be allowed. It was a bad decision to approach the problem this</div><div>way, and the correct response to it is to not allow it, throw an exception, and let the user fix it.</div><div>Otherwise, as I've stated earlier, there needs to be a policy that promotes the binary floating point </div><div>representation to decimal floating point representation without the mess from the 16th digit out.... and,</div><div>that may not be possible (needs to be discussed, and researched).</div><div><br></div><div>It is clear from Guido's response earlier this afternoon that he understands the problem, and has some</div><div>good ideas for how to proceed. I am happy with that, and will keep monitoring the news to see how</div><div>things go. </div><div><br></div><div>Thanks for your feedback.</div><div><br></div><div>marcus</div></div>