umath-validation-set-README.txt 967 B

123456789101112131415
  1. Steps to validate transcendental functions:
  2. 1) Add a file 'umath-validation-set-<ufuncname>.txt', where ufuncname is name of
  3. the function in NumPy you want to validate
  4. 2) The file should contain 4 columns: dtype,input,expected output,ulperror
  5. a. dtype: one of np.float16, np.float32, np.float64
  6. b. input: floating point input to ufunc in hex. Example: 0x414570a4
  7. represents 12.340000152587890625
  8. c. expected output: floating point output for the corresponding input in hex.
  9. This should be computed using a high(er) precision library and then rounded to
  10. same format as the input.
  11. d. ulperror: expected maximum ulp error of the function. This
  12. should be same across all rows of the same dtype. Otherwise, the function is
  13. tested for the maximum ulp error among all entries of that dtype.
  14. 3) Add file umath-validation-set-<ufuncname>.txt to the test file test_umath_accuracy.py
  15. which will then validate your ufunc.