Class gen_test_number (o2scl)¶
-
template<class fp_t = double>
class gen_test_number¶ Generate number sequence for testing.
This class is used to generate combinations of coefficients for testing the polynomial solvers.
For example, the first 15 numbers generated with the default radix are
1.000000e+00 0.000000e+00 -1.000000e+00 5.000000e-01 -5.000000e-01 7.500000e-01 -7.500000e-01 1.500000e+00 -1.500000e+00 2.000000e+00 -2.000000e+00 2.500000e-01 -2.500000e-01 8.750000e-01 -8.750000e-01 1.250000e+00 -1.250000e+00 4.000000e+00 -4.000000e+00 1.250000e-01 -1.250000e-01 9.375000e-01 -9.375000e-01 1.125000e+00 -1.125000e+00 8.000000e+00 -8.000000e+00 6.250000e-02 -6.250000e-02
This function is used in
src/other/poly_ts.cpp
which tests the polynomial solvers.Todo
In class gen_test_number, need to test this class somehow.
Note
With the default radix and double precision, this only gives about 400 unique values before some repetition is encountered. Smaller radices enable more unique values.