blob: 18818cc43db8e6acf753f734f305942aee2fd8f1 [file] [log] [blame]
purpose:
=======
increase CPUs workload - verify that results of some math functions are stable
Floating testcases are related to :
----------------------------------
- trigonometric (acos, asin, atan, atan2, cos, sin, tan),
- Euclidean distance function (hypot),
- Computes the natural logarithm of the gamma function (lgamma),
- Functions that manipulate floating-point numbers (modf, ldexp, frexp),
- exponential and logarithmic functions (exp, log, log10),
- hyperbolic (cosh, sinh, tanh),
- Bessel (j0, j1, y0, y1),
- and power functions (ceil, fabs, floor, fmod, pow, sqrt).
The testcase is splitted into 5 sets:
-------------------------------------
float_bessel, float_exp_log, float_iperb, float_power, float_trigo
need:
----
- all tests need data files to execute:
- Input Files located to the same Directory as the corresponding binary
Are in the form <function>_inp.ref
Or in the form d<function>
- Output Files located to the same Directory as the corresponding binary
Are in the form <function>_out.ref
Or in the form r<function>
example: acos function works with dacos file, (input datafile) and with rcos
file (result/output datafile).
please refer to float_*.c files for a full list.
algorithm:
---------
/* for one set - similar for all sets */
thread_code:
read input data /* read input datafile */
computes data
check_error /* compares results to expected results: output datafile */
main:
parse args
/* create and start threads */
from 1 up to number of function
from 1 up to number of thread
pthread_create/start
end
end
/* wait for all threads to end */
from 1 up to number of thread
pthread_join
end
if "ok" returns 0 else returns 1