-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add test function to test_precision, expecting assertion failure * add post processing to have symmetry property of distance without loss of precision * retrieve code, expecting error * reduce arithmetic operation to reduce loss of precision * revise equation to mitigate loss of precision * add test function to check precision for _calculate_squared_distance * minor change * change order of test function in test_precision * add parentheses to make sure the ouput remains the same when values are swapped * avoid fastmath reassoc flag to increase floating point precision * enhance test function * add fatmath flag reassoc and remove ninf * minor change in test function * increase decimal coverage in assertion * remove nnan from fastmath to be consistent with other func in core.py * use assert to make sure two values are identical * re-order arithmetic operation to increase safety and stability of the code regarding precision * add test function for distance symmetry propery in gpu * add parentheses and change order of multiplication * skip testing gpu-based test func if cude is not available * perform assersion with numpy testing instead of assert to be more explicit * reduce precision to pass tests for minimum version * add comment to test function to explain its purpose
- Loading branch information
1 parent
900b10c
commit d4c6a21
Showing
3 changed files
with
148 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters