You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package provides 2 useful things for testing the accuracy of functions. A `FloatIterator` type, and a function `test_acc`.
5
+
6
+
`FloatIterator{T}(min, max)` Construct an indexable iterator over all floating point values between min and max. This is useful for testing `Float16` and `Float32` implimentations of functions. For relatively cheap functions, testing all `Float16` values takes about .1 second, and testing all `Float32` values takes around 90 seconds. Do not use this for testing `Float64` inputs.
7
+
`test_acc` - Function
8
+
`test_acc(Dict(old_fun=>new_fun), xs; tol=1.5)` This tests whether `old_fun` and `new_fun` produce the same result on an iterator of `x` values. `tol` is the tolerance specified in ULPs (Units in Last Place).
9
+
`test_acc(f::Function, xx; tol = 1.5)` This is the same, except it tests the `BigFloat` method of a function against the method for `eltype(xx)`.
10
+
`test_acc(f::Function, min, max; tol = 1.5)` This tests whether all floating point values between `min` and `max` match.
11
+
`test_acc(f::Function, T::Type; tol = 1.5)` This tests whether all values of a Floating Point type match.
0 commit comments