Re: problem with floats and calculations

2010-02-28 Thread Albert van der Horst
In article , Dennis Lee Bieber wrote: >On Sun, 14 Feb 2010 10:33:54 +0100, Karsten Goen > declaimed the following in >gmane.comp.python.general: > >> Maybe anyone can help me with this problem, I don't want to generate for >> every possible user input a single formula. And also it should be possi

Re: problem with floats and calculations

2010-02-14 Thread Stefan Krah
Karsten Goen wrote: > also this doesn't help, there are still errors in the accuracy. Isn't there a > perfect way to do such calculations? The hint I gave you removes the most egregious error in your program. You still have to quantize the result of (c*var*d) / b) if you want it to match a. If I

Re: problem with floats and calculations

2010-02-14 Thread Mark Lawrence
[fix top posting] Karsten Goen wrote: hey all, I got a problem with floats and calculations. I made an mini-application where you get random questions with some science calculations in it So the user can type in his result with the values given by random creation. And the user value is

Re: problem with floats and calculations

2010-02-14 Thread Karsten Goen
also this doesn't help, there are still errors in the accuracy. Isn't there a perfect way to do such calculations? Karsten Goen wrote: > > hey all, > > I got a problem with floats and calculations. I made an mini-application > where > > you get random questions wi

Re: problem with floats and calculations

2010-02-14 Thread Stefan Krah
Karsten Goen wrote: > hey all, > I got a problem with floats and calculations. I made an mini-application where > you get random questions with some science calculations in it > So the user can type in his result with the values given by random creation. > And the user value is c

problem with floats and calculations

2010-02-14 Thread Karsten Goen
hey all, I got a problem with floats and calculations. I made an mini-application where you get random questions with some science calculations in it So the user can type in his result with the values given by random creation. And the user value is compared against the computer value... the