Problem with sqlite3 and Decimal

Frank Millman frank at chagford.com
Sat Dec 12 01:22:40 EST 2015


"Chris Angelico"  wrote in message 
news:CAPTjJmoPXFSnXe1QA8MjjncBZBpqNkztha8YHJv=MBm--ZE8jg at mail.gmail.com...

> On Sat, Dec 12, 2015 at 4:10 PM, Frank Millman <frank at chagford.com> wrote:
> > I can reproduce your example above. However, if I set the initial value 
> > to
> > 5678.7, then the sequence goes
> >
> > 5678.7
> > 5802.15
> > 5925.6
> > 6049.05
> > 6172.5
> >
> > I would have thought that adding 123.45 to 5802.15 would always produce 
> > the
> > same result, but here it seems to depend on prior events.
> >
> > Any idea why? Academic interest only, but I am curious.
>
> You weren't adding 123.45 to 5802.15. Here's why.

[snip really interesting explanation]

Wow, thanks for that, Chris. Consider my academic curiosity well and truly 
satisfied :-)

I have found a workaround for my problem, but I will post that in a separate 
message - still testing to make sure it is 100%.

Frank





More information about the Python-list mailing list