Question unit testing numerical algorithms
William Park
opengeometry at yahoo.ca
Sun Dec 8 16:05:10 EST 2002
More information about the Python-list mailing list
Sun Dec 8 16:05:10 EST 2002
- Previous message (by thread): Question unit testing numerical algorithms
- Next message (by thread): Question unit testing numerical algorithms
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Brian O. Bush <bushbo at attbi.com> wrote: > All. I have a basic question on testing numerical algorithms. In my > unit test code, I have two intervals, A = Interval(3.52, 5.83) and B = > Interval(-2.24, 6.04), and their SUM = Interval(1.28, 11.87). However, > when run there is a significantly small enough error to allow failure > in the assertion A+B == SUM. This is a feature of floating point. :-) If you want accuracy to 2 decimal places, then multiply everything by 100 and use integer. -- William Park, Open Geometry Consulting, <opengeometry at yahoo.ca> Linux solution for data management and processing.
- Previous message (by thread): Question unit testing numerical algorithms
- Next message (by thread): Question unit testing numerical algorithms
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list