X-Git-Url: http://nsz.repo.hu/git/?p=libm;a=blobdiff_plain;f=test%2Ftgmath%2Ft.c;fp=test%2Ftgmath%2Ft.c;h=836add509bd4e2197615c3470e8fb345495de7a8;hp=0000000000000000000000000000000000000000;hb=bc7a053425f94041d6672d2a4432dd4f89a1e1b8;hpb=ae446c7aae62c294a202e0d9ab3b48e4c2cdd6e4 diff --git a/test/tgmath/t.c b/test/tgmath/t.c new file mode 100644 index 0000000..836add5 --- /dev/null +++ b/test/tgmath/t.c @@ -0,0 +1,26 @@ +#include "tgmath.h" +#include +#include + + +int main() +{ + long double i = sin(1); + long double d = sin(1.0); + long double f = sin(1.0f); + long double l = sin(1.0l); + + long double complex dc = sin(1.0+0*I); + long double complex fc = sin(1.0f+0*I); + long double complex lc = sin(1.0l+0*I); + + printf("i %2u %La\n", sizeof sin(1), i); + printf("d %2u %La\n", sizeof sin(1.0), d); + printf("f %2u %La\n", sizeof sin(1.0f), f); + printf("l %2u %La\n", sizeof sin(1.0l), l); + + printf("dc %2u %La %La\n", sizeof sin(1.0+0*I), creall(dc), cimagl(dc)); + printf("fc %2u %La %La\n", sizeof sin(1.0f+0*I), creall(fc), cimagl(fc)); + printf("lc %2u %La %La\n", sizeof sin(1.0l+0*I), creall(lc), cimagl(lc)); + return 0; +}