lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Nov 30, 2010 at 6:11 PM, Axel Kittenberger <axkibe@gmail.com> wrote:
> Secondly how many digits mean equal depends on your application, so
> setting DELTA is up to the coder. It can be shown that depending on
> the intensity of calculation/number of loops underflow errors can add
> up to an arbitrary difference to the mathematical exact result.

What would be useful and educational is a module which implements
floating-point arithmetic and keeps track of the errors. You could ask
such a number object later what the error was and thus gain some
insight into the reliability of your algorithm. It would be especially
cool if you could specify numbers with pre-existing errors and watch
these errors propagate through a calculation. As I kept trying to tell
my students, no physical number is complete without a statement of its
accuracy.

steve d.