[PATCH] libtests/complex: Avoid generated files
Joel Sherrill
joel.sherrill at OARcorp.com
Mon May 21 14:48:35 UTC 2012
Just to make sure I am interpreting this right, you just
modified the code to use macros and do the same
thing at compile time.
On 05/21/2012 09:44 AM, sebastian.huber at embedded-brains.de wrote:
> From: Sebastian Huber<sebastian.huber at embedded-brains.de>
>
> Use C pre-processor instead of shell commands.
> ---
> testsuites/libtests/complex/Makefile.am | 20 -----
> testsuites/libtests/complex/docomplex.c | 104 +-------------------------
> testsuites/libtests/complex/docomplex.h | 118 ++++++++++++++++++++++++++++++
> testsuites/libtests/complex/docomplex.in | 116 -----------------------------
> testsuites/libtests/complex/docomplexf.c | 104 +-------------------------
> testsuites/libtests/complex/docomplexl.c | 104 +-------------------------
> 6 files changed, 133 insertions(+), 433 deletions(-)
> create mode 100644 testsuites/libtests/complex/docomplex.h
> delete mode 100644 testsuites/libtests/complex/docomplex.in
>
> diff --git a/testsuites/libtests/complex/Makefile.am b/testsuites/libtests/complex/Makefile.am
> index 2a16eec..7861d4a 100644
> --- a/testsuites/libtests/complex/Makefile.am
> +++ b/testsuites/libtests/complex/Makefile.am
> @@ -2,30 +2,10 @@ if HAS_COMPLEX
> rtems_tests_PROGRAMS = complex
> complex_SOURCES = init.c docomplex.c docomplexf.c docomplexl.c
> endif
> -EXTRA_DIST = docomplex.in
>
> # FIXME: Skip long double, not yet supported in newlib
> complex_CPPFLAGS = $(AM_CPPFLAGS) -DNO_LONG_DOUBLE
>
> -docomplex.c: $(srcdir)/docomplex.in
> - sed -e 's,[@]FTYPE[@],double,' \
> - -e 's,[@]FSUFFIX[@], ,g' \
> - -e 's,[@]FGUARD[@],NO_DOUBLE,' \
> - $(srcdir)/docomplex.in> $(srcdir)/docomplex.c
> -
> -docomplexf.c: $(srcdir)/docomplex.in
> - sed -e 's,[@]FTYPE[@],float,' \
> - -e 's,[@]FSUFFIX[@],f,g' \
> - -e 's,[@]FGUARD[@],NO_FLOAT,' \
> - $(srcdir)/docomplex.in> $(srcdir)/docomplexf.c
> -
> -docomplexl.c: $(srcdir)/docomplex.in
> - sed -e 's,[@]FTYPE[@],long double,' \
> - -e 's,[@]FSUFFIX[@],l,g' \
> - -e 's,%f,%Lf,g' \
> - -e 's,[@]FGUARD[@],NO_LONG_DOUBLE,' \
> - $(srcdir)/docomplex.in> $(srcdir)/docomplexl.c
> -
> dist_rtems_tests_DATA = complex.scn
>
> include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
> diff --git a/testsuites/libtests/complex/docomplex.c b/testsuites/libtests/complex/docomplex.c
> index 7a1b961..eb8d3df 100644
> --- a/testsuites/libtests/complex/docomplex.c
> +++ b/testsuites/libtests/complex/docomplex.c
> @@ -11,106 +11,12 @@
> */
>
> #ifdef HAVE_CONFIG_H
> -#include "config.h"
> + #include "config.h"
> #endif
>
> -#include<complex.h>
> -#include<stdio.h>
> -
> -extern void docomplex (void);
> -
> -void
> -docomplex (void)
> -{
> #ifndef NO_DOUBLE
> - complex double ca, cb, cc;
> - double f1;
> -
> - ca = 1.0 + 1.0 * I;
> - cb = 1.0 - 1.0 * I;
> -
> - f1 = cabs (ca);
> - fprintf (stdout, "cabs : %f\n", f1);
> -
> - cc = cacos (ca);
> - fprintf (stdout, "cacos : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = cacosh (ca);
> - fprintf (stdout, "cacosh : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - f1 = carg (ca);
> - fprintf (stdout, "carg : %f\n", f1);
> -
> - cc = casin (ca);
> - fprintf (stdout, "casin : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = casinh (ca);
> - fprintf (stdout, "casinh : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = catan (ca);
> - fprintf (stdout, "catan : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = catanh (ca);
> - fprintf (stdout, "catanh : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = ccos (ca);
> - fprintf (stdout, "ccos : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = ccosh (ca);
> - fprintf (stdout, "ccosh : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = cexp (ca);
> - fprintf (stdout, "cexp : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - f1 = cimag (ca);
> - fprintf (stdout, "cimag : %f\n", f1);
> -
> - cc = clog (ca);
> - fprintf (stdout, "clog : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = conj (ca);
> - fprintf (stdout, "conj : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = cpow (ca, cb);
> - fprintf (stdout, "cpow : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = cproj (ca);
> - fprintf (stdout, "cproj : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - f1 = creal (ca);
> - fprintf (stdout, "creal : %f\n", f1);
> -
> - cc = csin (ca);
> - fprintf (stdout, "csin : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = csinh (ca);
> - fprintf (stdout, "csinh : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = csqrt (ca);
> - fprintf (stdout, "csqrt : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = ctan (ca);
> - fprintf (stdout, "ctan : %f %fi\n", creal (cc),
> - cimag (cc));
> -
> - cc = ctanh (ca);
> - fprintf (stdout, "ctanh : %f %fi\n", creal (cc),
> - cimag (cc));
> + #define SUFFIX
> + #define FTYPE double
> + #define PRI "%f"
> + #include "docomplex.h"
> #endif
> -}
> diff --git a/testsuites/libtests/complex/docomplex.h b/testsuites/libtests/complex/docomplex.h
> new file mode 100644
> index 0000000..0f0b21a
> --- /dev/null
> +++ b/testsuites/libtests/complex/docomplex.h
> @@ -0,0 +1,118 @@
> +/*
> + * Copyright (c) 2010, 2011 by
> + * Ralf Corsepius, Ulm/Germany. All rights reserved.
> + *
> + * Permission to use, copy, modify, and distribute this software
> + * is freely granted, provided that this notice is preserved.
> + */
> +
> +#include<complex.h>
> +#include<stdio.h>
> +
> +#define CONCAT(x, y) x ## y
> +
> +#define XCONCAT(x, y) CONCAT(x, y)
> +
> +#define STRINGIFY(x, y) # x # y
> +
> +#define XSTRINGIFY(x, y) STRINGIFY(x, y)
> +
> +#define FUNC(name) XCONCAT(name, SUFFIX)
> +
> +#define STR(name) XSTRINGIFY(name, SUFFIX)
> +
> +extern void FUNC(docomplex) (void);
> +
> +void
> +FUNC(docomplex) (void)
> +{
> + complex FTYPE ca, cb, cc;
> + FTYPE f1;
> +
> + ca = 1.0 + 1.0 * I;
> + cb = 1.0 - 1.0 * I;
> +
> + f1 = FUNC(cabs) (ca);
> + fprintf (stdout, STR(cabs) " : " PRI "\n", f1);
> +
> + cc = FUNC(cacos) (ca);
> + fprintf (stdout, STR(cacos) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(cacosh) (ca);
> + fprintf (stdout, STR(cacosh) ": " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + f1 = FUNC(carg) (ca);
> + fprintf (stdout, STR(carg) " : " PRI "\n", f1);
> +
> + cc = FUNC(casin) (ca);
> + fprintf (stdout, STR(casin) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(casinh) (ca);
> + fprintf (stdout, STR(casinh) ": " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(catan) (ca);
> + fprintf (stdout, STR(catan) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(catanh) (ca);
> + fprintf (stdout, STR(catanh) ": " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(ccos) (ca);
> + fprintf (stdout, STR(ccos) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(ccosh) (ca);
> + fprintf (stdout, STR(ccosh) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(cexp) (ca);
> + fprintf (stdout, STR(cexp) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + f1 = FUNC(cimag) (ca);
> + fprintf (stdout, STR(cimag) " : " PRI "\n", f1);
> +
> + cc = FUNC(clog) (ca);
> + fprintf (stdout, STR(clog) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(conj) (ca);
> + fprintf (stdout, STR(conj) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(cpow) (ca, cb);
> + fprintf (stdout, STR(cpow) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(cproj) (ca);
> + fprintf (stdout, STR(cproj) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + f1 = FUNC(creal) (ca);
> + fprintf (stdout, STR(creal) " : " PRI "\n", f1);
> +
> + cc = FUNC(csin) (ca);
> + fprintf (stdout, STR(csin) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(csinh) (ca);
> + fprintf (stdout, STR(csinh) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(csqrt) (ca);
> + fprintf (stdout, STR(csqrt) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(ctan) (ca);
> + fprintf (stdout, STR(ctan) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +
> + cc = FUNC(ctanh) (ca);
> + fprintf (stdout, STR(ctanh) " : " PRI " " PRI "i\n", FUNC(creal) (cc),
> + FUNC(cimag) (cc));
> +}
> diff --git a/testsuites/libtests/complex/docomplex.in b/testsuites/libtests/complex/docomplex.in
> deleted file mode 100644
> index e476f6d..0000000
> --- a/testsuites/libtests/complex/docomplex.in
> +++ /dev/null
> @@ -1,116 +0,0 @@
> -/*
> - * Copyright (c) 2010, 2011 by
> - * Ralf Corsepius, Ulm/Germany. All rights reserved.
> - *
> - * Permission to use, copy, modify, and distribute this software
> - * is freely granted, provided that this notice is preserved.
> - */
> -
> -/*
> - * Try to compile and link against POSIX complex math routines.
> - */
> -
> -#ifdef HAVE_CONFIG_H
> -#include "config.h"
> -#endif
> -
> -#include<complex.h>
> -#include<stdio.h>
> -
> -extern void docomplex at FSUFFIX@ (void);
> -
> -void
> -docomplex at FSUFFIX@ (void)
> -{
> -#ifndef @FGUARD@
> - complex @FTYPE@ ca, cb, cc;
> - @FTYPE@ f1;
> -
> - ca = 1.0 + 1.0 * I;
> - cb = 1.0 - 1.0 * I;
> -
> - f1 = cabs at FSUFFIX@ (ca);
> - fprintf (stdout, "cabs at FSUFFIX@ : %f\n", f1);
> -
> - cc = cacos at FSUFFIX@ (ca);
> - fprintf (stdout, "cacos at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = cacosh at FSUFFIX@ (ca);
> - fprintf (stdout, "cacosh at FSUFFIX@: %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - f1 = carg at FSUFFIX@ (ca);
> - fprintf (stdout, "carg at FSUFFIX@ : %f\n", f1);
> -
> - cc = casin at FSUFFIX@ (ca);
> - fprintf (stdout, "casin at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = casinh at FSUFFIX@ (ca);
> - fprintf (stdout, "casinh at FSUFFIX@: %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = catan at FSUFFIX@ (ca);
> - fprintf (stdout, "catan at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = catanh at FSUFFIX@ (ca);
> - fprintf (stdout, "catanh at FSUFFIX@: %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = ccos at FSUFFIX@ (ca);
> - fprintf (stdout, "ccos at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = ccosh at FSUFFIX@ (ca);
> - fprintf (stdout, "ccosh at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = cexp at FSUFFIX@ (ca);
> - fprintf (stdout, "cexp at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - f1 = cimag at FSUFFIX@ (ca);
> - fprintf (stdout, "cimag at FSUFFIX@ : %f\n", f1);
> -
> - cc = clog at FSUFFIX@ (ca);
> - fprintf (stdout, "clog at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = conj at FSUFFIX@ (ca);
> - fprintf (stdout, "conj at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = cpow at FSUFFIX@ (ca, cb);
> - fprintf (stdout, "cpow at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = cproj at FSUFFIX@ (ca);
> - fprintf (stdout, "cproj at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - f1 = creal at FSUFFIX@ (ca);
> - fprintf (stdout, "creal at FSUFFIX@ : %f\n", f1);
> -
> - cc = csin at FSUFFIX@ (ca);
> - fprintf (stdout, "csin at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = csinh at FSUFFIX@ (ca);
> - fprintf (stdout, "csinh at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = csqrt at FSUFFIX@ (ca);
> - fprintf (stdout, "csqrt at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = ctan at FSUFFIX@ (ca);
> - fprintf (stdout, "ctan at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -
> - cc = ctanh at FSUFFIX@ (ca);
> - fprintf (stdout, "ctanh at FSUFFIX@ : %f %fi\n", creal at FSUFFIX@ (cc),
> - cimag at FSUFFIX@ (cc));
> -#endif
> -}
> diff --git a/testsuites/libtests/complex/docomplexf.c b/testsuites/libtests/complex/docomplexf.c
> index ff2e73d..bc1ffb3 100644
> --- a/testsuites/libtests/complex/docomplexf.c
> +++ b/testsuites/libtests/complex/docomplexf.c
> @@ -11,106 +11,12 @@
> */
>
> #ifdef HAVE_CONFIG_H
> -#include "config.h"
> + #include "config.h"
> #endif
>
> -#include<complex.h>
> -#include<stdio.h>
> -
> -extern void docomplexf (void);
> -
> -void
> -docomplexf (void)
> -{
> #ifndef NO_FLOAT
> - complex float ca, cb, cc;
> - float f1;
> -
> - ca = 1.0 + 1.0 * I;
> - cb = 1.0 - 1.0 * I;
> -
> - f1 = cabsf (ca);
> - fprintf (stdout, "cabsf : %f\n", f1);
> -
> - cc = cacosf (ca);
> - fprintf (stdout, "cacosf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = cacoshf (ca);
> - fprintf (stdout, "cacoshf: %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - f1 = cargf (ca);
> - fprintf (stdout, "cargf : %f\n", f1);
> -
> - cc = casinf (ca);
> - fprintf (stdout, "casinf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = casinhf (ca);
> - fprintf (stdout, "casinhf: %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = catanf (ca);
> - fprintf (stdout, "catanf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = catanhf (ca);
> - fprintf (stdout, "catanhf: %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = ccosf (ca);
> - fprintf (stdout, "ccosf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = ccoshf (ca);
> - fprintf (stdout, "ccoshf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = cexpf (ca);
> - fprintf (stdout, "cexpf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - f1 = cimagf (ca);
> - fprintf (stdout, "cimagf : %f\n", f1);
> -
> - cc = clogf (ca);
> - fprintf (stdout, "clogf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = conjf (ca);
> - fprintf (stdout, "conjf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = cpowf (ca, cb);
> - fprintf (stdout, "cpowf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = cprojf (ca);
> - fprintf (stdout, "cprojf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - f1 = crealf (ca);
> - fprintf (stdout, "crealf : %f\n", f1);
> -
> - cc = csinf (ca);
> - fprintf (stdout, "csinf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = csinhf (ca);
> - fprintf (stdout, "csinhf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = csqrtf (ca);
> - fprintf (stdout, "csqrtf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = ctanf (ca);
> - fprintf (stdout, "ctanf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> -
> - cc = ctanhf (ca);
> - fprintf (stdout, "ctanhf : %f %fi\n", crealf (cc),
> - cimagf (cc));
> + #define SUFFIX f
> + #define FTYPE float
> + #define PRI "%f"
> + #include "docomplex.h"
> #endif
> -}
> diff --git a/testsuites/libtests/complex/docomplexl.c b/testsuites/libtests/complex/docomplexl.c
> index f63d00a..a4ed1be 100644
> --- a/testsuites/libtests/complex/docomplexl.c
> +++ b/testsuites/libtests/complex/docomplexl.c
> @@ -11,106 +11,12 @@
> */
>
> #ifdef HAVE_CONFIG_H
> -#include "config.h"
> + #include "config.h"
> #endif
>
> -#include<complex.h>
> -#include<stdio.h>
> -
> -extern void docomplexl (void);
> -
> -void
> -docomplexl (void)
> -{
> #ifndef NO_LONG_DOUBLE
> - complex long double ca, cb, cc;
> - long double f1;
> -
> - ca = 1.0 + 1.0 * I;
> - cb = 1.0 - 1.0 * I;
> -
> - f1 = cabsl (ca);
> - fprintf (stdout, "cabsl : %Lf\n", f1);
> -
> - cc = cacosl (ca);
> - fprintf (stdout, "cacosl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = cacoshl (ca);
> - fprintf (stdout, "cacoshl: %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - f1 = cargl (ca);
> - fprintf (stdout, "cargl : %Lf\n", f1);
> -
> - cc = casinl (ca);
> - fprintf (stdout, "casinl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = casinhl (ca);
> - fprintf (stdout, "casinhl: %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = catanl (ca);
> - fprintf (stdout, "catanl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = catanhl (ca);
> - fprintf (stdout, "catanhl: %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = ccosl (ca);
> - fprintf (stdout, "ccosl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = ccoshl (ca);
> - fprintf (stdout, "ccoshl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = cexpl (ca);
> - fprintf (stdout, "cexpl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - f1 = cimagl (ca);
> - fprintf (stdout, "cimagl : %Lf\n", f1);
> -
> - cc = clogl (ca);
> - fprintf (stdout, "clogl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = conjl (ca);
> - fprintf (stdout, "conjl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = cpowl (ca, cb);
> - fprintf (stdout, "cpowl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = cprojl (ca);
> - fprintf (stdout, "cprojl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - f1 = creall (ca);
> - fprintf (stdout, "creall : %Lf\n", f1);
> -
> - cc = csinl (ca);
> - fprintf (stdout, "csinl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = csinhl (ca);
> - fprintf (stdout, "csinhl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = csqrtl (ca);
> - fprintf (stdout, "csqrtl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = ctanl (ca);
> - fprintf (stdout, "ctanl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> -
> - cc = ctanhl (ca);
> - fprintf (stdout, "ctanhl : %Lf %Lfi\n", creall (cc),
> - cimagl (cc));
> + #define SUFFIX l
> + #define FTYPE long double
> + #define PRI "%Lf"
> + #include "docomplex.h"
> #endif
> -}
> --
> 1.6.4.2
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the devel
mailing list