Skip to content

Commit 2cdbb89

Browse files
authored
Update README.md
1 parent 5a81dfd commit 2cdbb89

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,21 @@ ULP testing for Floating Point special functions.
33

44
This package provides 2 useful things for testing the accuracy of functions. A `FloatIterator` type, and a function `test_acc`.
55

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.
6+
* `FloatIterator{T}(min, max)`
7+
8+
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.
9+
10+
711
`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.
12+
* `test_acc(Dict(old_fun=>new_fun), xs; tol=1.5)`
13+
14+
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).
15+
* `test_acc(f::Function, xx; tol = 1.5)`
16+
17+
This is the same, except it tests the `BigFloat` method of a function against the method for `eltype(xx)`.
18+
* `test_acc(f::Function, min, max; tol = 1.5)`
19+
20+
This tests whether all floating point values between `min` and `max` match.
21+
* `test_acc(f::Function, T::Type; tol = 1.5)`
22+
23+
This tests whether all values of a Floating Point type match.

0 commit comments

Comments
 (0)