const float exp2_values[] = {
+ -INFINITY,
-60,
-4,
-2,
1,
2,
4,
- 60
+ 60,
+ INFINITY,
+ NAN
};
*/
1.4012984643248171e-45,
#endif
+ -INFINITY,
+ 0,
1e-007,
0.1,
0.5,
2,
4,
100000,
- 1e+018
+ 1e+018,
+ INFINITY,
+ NAN
};
const float sincos_values[] = {
+ -INFINITY,
-5*M_PI/4,
-4*M_PI/4,
-4*M_PI/4,
-3*M_PI/4,
-2*M_PI/4,
-1*M_PI/4,
- 1*M_PI/4,
- 2*M_PI/4,
- 3*M_PI/4,
- 4*M_PI/4,
- 5*M_PI/4,
+ 1*M_PI/4,
+ 2*M_PI/4,
+ 3*M_PI/4,
+ 4*M_PI/4,
+ 5*M_PI/4,
+ INFINITY,
+ NAN
};
const float round_values[] = {
unary_tests[] = {
{"neg", &lp_build_negate, &negf, exp2_values, Elements(exp2_values), 20.0 },
{"exp2", &lp_build_exp2, &exp2f, exp2_values, Elements(exp2_values), 20.0 },
- {"log2", &lp_build_log2, &log2f, log2_values, Elements(log2_values), 20.0 },
+ {"log2", &lp_build_log2_safe, &log2f, log2_values, Elements(log2_values), 20.0 },
{"exp", &lp_build_exp, &expf, exp2_values, Elements(exp2_values), 18.0 },
- {"log", &lp_build_log, &logf, log2_values, Elements(log2_values), 20.0 },
+ {"log", &lp_build_log_safe, &logf, log2_values, Elements(log2_values), 20.0 },
{"rcp", &lp_build_rcp, &rcpf, rcp_values, Elements(rcp_values), 20.0 },
{"rsqrt", &lp_build_rsqrt, &rsqrtf, rsqrt_values, Elements(rsqrt_values), 20.0 },
{"sin", &lp_build_sin, &sinf, sincos_values, Elements(sincos_values), 20.0 },