9 CONST
char str
[] = "123.456";
10 double x
,h
,li
,lr
,a
,lrr
;
14 printf ("%g %g\n", x
, pow (10.0, 3.0));
18 printf("sinh(2.0) = %g\n", x
);
22 printf("sinh(3.0) = %g\n", x
);
30 printf("atan2(3,2) = %g\n", a
);
34 printf("pow(%g,4.0) = %g\n", h
, lr
);
42 printf("%g / exp(%g * 5) = %g\n", lrr
, a
, lr
);
48 printf("%g + 5*log(%g) = %g\n", lrr
, h
, li
);
50 printf("cos(%g) = %g, sin(%g) = %g\n", li
, cos(li
), li
, sin(li
));
52 x
= drem(10.3435,6.2831852);
54 printf("drem(10.3435,6.2831852) = %g\n", x
);
56 x
= drem(-10.3435,6.2831852);
58 printf("drem(-10.3435,6.2831852) = %g\n", x
);
60 x
= drem(-10.3435,-6.2831852);
62 printf("drem(-10.3435,-6.2831852) = %g\n", x
);
64 x
= drem(10.3435,-6.2831852);
66 printf("drem(10.3435,-6.2831852) = %g\n", x
);
69 printf("x%8.6gx\n", .5);
70 printf("x%-8.6gx\n", .5);
71 printf("x%6.6gx\n", .5);
74 double x
= atof ("-1e-17-");
75 printf ("%g %c= %g %s!\n",
77 x
== -1e-17 ? '=' : '!',
79 x
== -1e-17 ? "Worked" : "Failed");