/*
 * This file was generated automatically by xsubpp version 1.9507 from the 
 * contents of expint.xs. Do not edit this file, edit expint.xs instead.
 *
 *	ANY CHANGES MADE HERE WILL BE LOST! 
 *
 */

#line 1 "expint.xs"
#ifdef __cplusplus
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#ifdef __cplusplus
}
#endif

# undef LOCAL

double expint_local(double x, double ym, double x0, double y0, double xp, double yp);
double expint_end(double low, double x, double ym, double x0, double y0,
			double xp, double yp);

struct parab_t	{
	double xctr, yctr, coef;
	double slope, value;
	};

struct parab_t expint_parab(double xm, double ym, double x0, double y0, double xp, double yp);


#line 35 "expint.c"
XS(XS_expint_localint)
{
    dXSARGS;
    if (items != 6)
	croak("Usage: expint::localint(xm, ym, x0, y0, xp, yp)");
    {
	double	xm = (double)SvNV(ST(0));
	double	ym = (double)SvNV(ST(1));
	double	x0 = (double)SvNV(ST(2));
	double	y0 = (double)SvNV(ST(3));
	double	xp = (double)SvNV(ST(4));
	double	yp = (double)SvNV(ST(5));
	double	RETVAL;
#line 39 "expint.xs"
	RETVAL = expint_local(xm, ym, x0, y0, xp, yp);
#line 51 "expint.c"
	ST(0) = sv_newmortal();
	sv_setnv(ST(0), (double)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_expint_endint)
{
    dXSARGS;
    if (items != 7)
	croak("Usage: expint::endint(low, xm, ym, x0, y0, xp, yp)");
    {
	double	low = (double)SvNV(ST(0));
	double	xm = (double)SvNV(ST(1));
	double	ym = (double)SvNV(ST(2));
	double	x0 = (double)SvNV(ST(3));
	double	y0 = (double)SvNV(ST(4));
	double	xp = (double)SvNV(ST(5));
	double	yp = (double)SvNV(ST(6));
	double	RETVAL;
#line 55 "expint.xs"
	RETVAL = expint_end(low, xm, ym, x0, y0, xp, yp);
#line 74 "expint.c"
	ST(0) = sv_newmortal();
	sv_setnv(ST(0), (double)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_expint_parabx)
{
    dXSARGS;
    if (items != 6)
	croak("Usage: expint::parabx(xm, ym, x0, y0, xp, yp)");
    {
	double	xm = (double)SvNV(ST(0));
	double	ym = (double)SvNV(ST(1));
	double	x0 = (double)SvNV(ST(2));
	double	y0 = (double)SvNV(ST(3));
	double	xp = (double)SvNV(ST(4));
	double	yp = (double)SvNV(ST(5));
#line 70 "expint.xs"
	struct parab_t tmp;
#line 95 "expint.c"
	double	RETVAL;
#line 72 "expint.xs"
	tmp = expint_parab(xm, ym, x0, y0, xp, yp);
	RETVAL = tmp.xctr;
#line 100 "expint.c"
	ST(0) = sv_newmortal();
	sv_setnv(ST(0), (double)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_expint_paraby)
{
    dXSARGS;
    if (items != 6)
	croak("Usage: expint::paraby(xm, ym, x0, y0, xp, yp)");
    {
	double	xm = (double)SvNV(ST(0));
	double	ym = (double)SvNV(ST(1));
	double	x0 = (double)SvNV(ST(2));
	double	y0 = (double)SvNV(ST(3));
	double	xp = (double)SvNV(ST(4));
	double	yp = (double)SvNV(ST(5));
#line 87 "expint.xs"
	struct parab_t tmp;
#line 121 "expint.c"
	double	RETVAL;
#line 89 "expint.xs"
	tmp = expint_parab(xm, ym, x0, y0, xp, yp);
	RETVAL = tmp.yctr;
#line 126 "expint.c"
	ST(0) = sv_newmortal();
	sv_setnv(ST(0), (double)RETVAL);
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS(boot_expint)
{
    dXSARGS;
    char* file = __FILE__;

    XS_VERSION_BOOTCHECK ;

        newXSproto("expint::localint", XS_expint_localint, file, "$$$$$$");
        newXSproto("expint::endint", XS_expint_endint, file, "$$$$$$$");
        newXSproto("expint::parabx", XS_expint_parabx, file, "$$$$$$");
        newXSproto("expint::paraby", XS_expint_paraby, file, "$$$$$$");
    XSRETURN_YES;
}

