mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Add more relaxed math conformance tests (#1079)
* Add relaxed tests for functions (in an implementation that uses derived functions) that define an absolute ULP error requirement, but were not tested in the current conformance suite * acos * asin * atan * cospi * sinpi * log10
This commit is contained in:
@@ -124,6 +124,8 @@ double reference_cospi( double x)
|
||||
return reference_sin( x * M_PI );
|
||||
}
|
||||
|
||||
double reference_relaxed_cospi(double x) { return reference_cospi(x); }
|
||||
|
||||
double reference_relaxed_divide( double x, double y ) { return (float)(((float) x ) / ( (float) y )); }
|
||||
|
||||
double reference_divide( double x, double y ) { return x / y; }
|
||||
@@ -719,6 +721,8 @@ double reference_sinpi( double x)
|
||||
return reference_sin( r * M_PI );
|
||||
}
|
||||
|
||||
double reference_relaxed_sinpi(double x) { return reference_sinpi(x); }
|
||||
|
||||
double reference_tanpi( double x)
|
||||
{
|
||||
// set aside the sign (allows us to preserve sign of -0)
|
||||
@@ -1200,6 +1204,8 @@ double reference_atanh( double x )
|
||||
return signed_half * reference_log1p(2.0 * x / (1-x));
|
||||
}
|
||||
|
||||
double reference_relaxed_atan(double x) { return reference_atan(x); }
|
||||
|
||||
double reference_relaxed_exp2( double x )
|
||||
{
|
||||
return reference_exp2(x);
|
||||
@@ -5263,6 +5269,8 @@ long double reference_acosl(long double x)
|
||||
return head + ((y + tail) - x);
|
||||
}
|
||||
|
||||
double reference_relaxed_acos(double x) { return reference_acos(x); }
|
||||
|
||||
double reference_log10(double x)
|
||||
{
|
||||
if( x == 0.0 )
|
||||
@@ -5280,6 +5288,8 @@ double reference_log10(double x)
|
||||
return logxHi*log2Hi;
|
||||
}
|
||||
|
||||
double reference_relaxed_log10(double x) { return reference_log10(x); }
|
||||
|
||||
long double reference_log10l(long double x)
|
||||
{
|
||||
if( x == 0.0 )
|
||||
@@ -5410,6 +5420,8 @@ double reference_asin(double x)
|
||||
return asin( x );
|
||||
}
|
||||
|
||||
double reference_relaxed_asin(double x) { return reference_asin(x); }
|
||||
|
||||
double reference_fabs(double x)
|
||||
{
|
||||
return fabs( x);
|
||||
|
||||
Reference in New Issue
Block a user