Skip to content

Commit 5a81dfd

Browse files
authored
update docs
1 parent a83d87e commit 5a81dfd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
# SpecialFunctionAccuracyTests.jl
22
ULP testing for Floating Point special functions.
3+
4+
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

Comments
 (0)