2017-10-21 23:40:19 +00:00
|
|
|
/* Conformance Test 19.6.0.1: Verification of pow, sqrt library functions */
|
|
|
|
|
|
|
|
#include <math.h>
|
|
|
|
|
2022-10-17 22:50:42 +00:00
|
|
|
int printf(const char *, ...);
|
|
|
|
|
|
|
|
int main (void)
|
2017-10-21 23:40:19 +00:00
|
|
|
{
|
|
|
|
double d1;
|
|
|
|
|
|
|
|
d1 = pow (-3.0, 3.0);
|
|
|
|
if (d1 != -27.0)
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
d1 = pow (555.33e+10, 0.0);
|
|
|
|
if (d1 != 1.0)
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
d1 = pow (0.0, 234.77);
|
|
|
|
if (d1 != 0.0)
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
d1 = sqrt (81.0);
|
|
|
|
if (d1 != 9.0)
|
|
|
|
goto Fail;
|
|
|
|
|
|
|
|
|
|
|
|
printf ("Passed Conformance Test 19.6.0.1\n");
|
2022-10-17 22:50:42 +00:00
|
|
|
return 0;
|
2017-10-21 23:40:19 +00:00
|
|
|
|
|
|
|
Fail:
|
|
|
|
printf ("Failed Conformance Test 19.6.0.1\n");
|
|
|
|
}
|