require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_TGMATH_H)) {
    eval 'sub _TGMATH_H () {1;}' unless defined(&_TGMATH_H);
    require 'math.ph';
    unless(defined(&__cplusplus)) {
	require 'complex.ph';
	eval 'sub __TGMATH_CPLX {
	    my($z,$R,$C) = @_;
    	    eval q( &__builtin_tgmath ($R &f, $R, $R &l, $C &f, $C, $C &l, ($z)));
	}' unless defined(&__TGMATH_CPLX);
	eval 'sub __TGMATH_CPLX_2 {
	    my($z1,$z2,$R,$C) = @_;
    	    eval q( &__builtin_tgmath ($R &f, $R, $R &l, $C &f, $C, $C &l, ($z1), ($z2)));
	}' unless defined(&__TGMATH_CPLX_2);
	eval 'sub __TGMATH_REAL {
	    my($x,$R) = @_;
    	    eval q( &__builtin_tgmath ($R &f, $R, $R &l, ($x)));
	}' unless defined(&__TGMATH_REAL);
	eval 'sub __TGMATH_REAL_2 {
	    my($x,$y,$R) = @_;
    	    eval q( &__builtin_tgmath ($R &f, $R, $R &l, ($x), ($y)));
	}' unless defined(&__TGMATH_REAL_2);
	eval 'sub __TGMATH_REAL_3 {
	    my($x,$y,$z,$R) = @_;
    	    eval q( &__builtin_tgmath ($R &f, $R, $R &l, ($x), ($y), ($z)));
	}' unless defined(&__TGMATH_REAL_3);
	eval 'sub __TGMATH_CPLX_ONLY {
	    my($z,$C) = @_;
    	    eval q( &__builtin_tgmath ($C &f, $C, $C &l, ($z)));
	}' unless defined(&__TGMATH_CPLX_ONLY);
	eval 'sub acos {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &acos,  &cacos));
	}' unless defined(&acos);
	eval 'sub asin {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &asin,  &casin));
	}' unless defined(&asin);
	eval 'sub atan {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &atan,  &catan));
	}' unless defined(&atan);
	eval 'sub acosh {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &acosh,  &cacosh));
	}' unless defined(&acosh);
	eval 'sub asinh {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &asinh,  &casinh));
	}' unless defined(&asinh);
	eval 'sub atanh {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &atanh,  &catanh));
	}' unless defined(&atanh);
	eval 'sub cos {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &cos,  &ccos));
	}' unless defined(&cos);
	eval 'sub sin {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &sin,  &csin));
	}' unless defined(&sin);
	eval 'sub tan {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &tan,  &ctan));
	}' unless defined(&tan);
	eval 'sub cosh {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &cosh,  &ccosh));
	}' unless defined(&cosh);
	eval 'sub sinh {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &sinh,  &csinh));
	}' unless defined(&sinh);
	eval 'sub tanh {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &tanh,  &ctanh));
	}' unless defined(&tanh);
	eval 'sub exp {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &exp,  &cexp));
	}' unless defined(&exp);
	eval 'sub log {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &log,  &clog));
	}' unless defined(&log);
	eval 'sub pow {
	    my($z1,$z2) = @_;
    	    eval q( &__TGMATH_CPLX_2($z1, $z2,  &pow,  &cpow));
	}' unless defined(&pow);
	eval 'sub sqrt {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &sqrt,  &csqrt));
	}' unless defined(&sqrt);
	eval 'sub fabs {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX($z,  &fabs,  &cabs));
	}' unless defined(&fabs);
	eval 'sub atan2 {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &atan2));
	}' unless defined(&atan2);
	eval 'sub cbrt {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &cbrt));
	}' unless defined(&cbrt);
	eval 'sub ceil {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &ceil));
	}' unless defined(&ceil);
	eval 'sub copysign {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &copysign));
	}' unless defined(&copysign);
	eval 'sub erf {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &erf));
	}' unless defined(&erf);
	eval 'sub erfc {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &erfc));
	}' unless defined(&erfc);
	eval 'sub exp2 {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &exp2));
	}' unless defined(&exp2);
	eval 'sub expm1 {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &expm1));
	}' unless defined(&expm1);
	eval 'sub fdim {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &fdim));
	}' unless defined(&fdim);
	eval 'sub floor {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &floor));
	}' unless defined(&floor);
	eval 'sub fma {
	    my($x,$y,$z) = @_;
    	    eval q( &__TGMATH_REAL_3($x, $y, $z,  &fma));
	}' unless defined(&fma);
	eval 'sub fmax {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &fmax));
	}' unless defined(&fmax);
	eval 'sub fmin {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &fmin));
	}' unless defined(&fmin);
	eval 'sub fmod {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &fmod));
	}' unless defined(&fmod);
	eval 'sub frexp {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &frexp));
	}' unless defined(&frexp);
	eval 'sub hypot {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &hypot));
	}' unless defined(&hypot);
	eval 'sub ilogb {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &ilogb));
	}' unless defined(&ilogb);
	eval 'sub ldexp {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &ldexp));
	}' unless defined(&ldexp);
	eval 'sub lgamma {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &lgamma));
	}' unless defined(&lgamma);
	eval 'sub llrint {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &llrint));
	}' unless defined(&llrint);
	eval 'sub llround {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &llround));
	}' unless defined(&llround);
	eval 'sub log10 {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &log10));
	}' unless defined(&log10);
	eval 'sub log1p {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &log1p));
	}' unless defined(&log1p);
	eval 'sub log2 {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &log2));
	}' unless defined(&log2);
	eval 'sub logb {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &logb));
	}' unless defined(&logb);
	eval 'sub lrint {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &lrint));
	}' unless defined(&lrint);
	eval 'sub lround {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &lround));
	}' unless defined(&lround);
	eval 'sub nearbyint {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &nearbyint));
	}' unless defined(&nearbyint);
	eval 'sub nextafter {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &nextafter));
	}' unless defined(&nextafter);
	eval 'sub nexttoward {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &nexttoward));
	}' unless defined(&nexttoward);
	eval 'sub remainder {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &remainder));
	}' unless defined(&remainder);
	eval 'sub remquo {
	    my($x,$y,$z) = @_;
    	    eval q( &__TGMATH_REAL_3($x, $y, $z,  &remquo));
	}' unless defined(&remquo);
	eval 'sub rint {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &rint));
	}' unless defined(&rint);
	eval 'sub round {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &round));
	}' unless defined(&round);
	eval 'sub scalbn {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &scalbn));
	}' unless defined(&scalbn);
	eval 'sub scalbln {
	    my($x,$y) = @_;
    	    eval q( &__TGMATH_REAL_2($x, $y,  &scalbln));
	}' unless defined(&scalbln);
	eval 'sub tgamma {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &tgamma));
	}' unless defined(&tgamma);
	eval 'sub trunc {
	    my($x) = @_;
    	    eval q( &__TGMATH_REAL($x,  &trunc));
	}' unless defined(&trunc);
	eval 'sub carg {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX_ONLY($z,  &carg));
	}' unless defined(&carg);
	eval 'sub cimag {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX_ONLY($z,  &cimag));
	}' unless defined(&cimag);
	eval 'sub conj {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX_ONLY($z,  &conj));
	}' unless defined(&conj);
	eval 'sub cproj {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX_ONLY($z,  &cproj));
	}' unless defined(&cproj);
	eval 'sub creal {
	    my($z) = @_;
    	    eval q( &__TGMATH_CPLX_ONLY($z,  &creal));
	}' unless defined(&creal);
    }
}
1;
