cmocka
cmocka copied to clipboard
functions for testing floating point numbers.
For numerical applications we sometimes need to test if floating point numbers are correct.
two few useful functions are
int assert_double_close(double a, double b, double rtol, double atol);
int assert_double_allclose(double *a, double * b, int size, double rtol, double atol);
The behaviour of these functions can be modelled after the testing functions in numpy
:
https://docs.scipy.org/doc/numpy-dev/reference/generated/numpy.testing.assert_allclose.html
I'd like to start working on a PR, if there are no other considerations that these functions were not included in cmocka.
@cryptomilk Or am I supposed to move the disucssion to cmocka.org?
Yes, please use the cmocka mailinglist
Hi all. I'm going to close this one since this is a fork of cmocka. I'm suggesting moving questions to the upstream repository. But questions are always welcome.