On 2013-01-09, Daniel Friedan <[email protected]> wrote: > ------=_Part_186_18436191.1357759234951 > Content-Type: text/plain; charset=ISO-8859-1 > > I think I understand now. The calculation is surely not linear in 0.24. > What appears in the solution is 1/(1/0.24) which is not exactly 0.24.
yes, those are the joys of floating point numbers (and someone blindly using '==' on floating point numbers) IMHO one might like a setting when == on such data throws an error. At least for debugging. This is actually doable with Sage... Dmitrii > > thanks > > On Wednesday, January 9, 2013 11:11:01 AM UTC, Volker Braun wrote: >> >> For starters, 0.24 can't be represented exactly. An oldie but goodie on >> the subject: >> >> http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html >> >> On Wednesday, January 9, 2013 10:40:21 AM UTC, Daniel Friedan wrote: >>> >>> Should solve_right() be introducing a numerical error here? The only >>> numbers involved are 0, 1, and 0.24 and the calculation is linear in 0.24. >> >> > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support?hl=en.
