diff options
Diffstat (limited to 'src/c/specialFunctions')
24 files changed, 704 insertions, 0 deletions
diff --git a/src/c/specialFunctions/erf/derfa.c b/src/c/specialFunctions/erf/derfa.c new file mode 100644 index 0000000..972d743 --- /dev/null +++ b/src/c/specialFunctions/erf/derfa.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erf.h" + +void derfa(double* inp1, int sizer, int sizec,double* out) +{ + for (int i = 0; i < sizer*sizec; i++) + { + out[i] = erf(inp1[i]); + } +} + diff --git a/src/c/specialFunctions/erf/derfs.c b/src/c/specialFunctions/erf/derfs.c new file mode 100644 index 0000000..22b5d64 --- /dev/null +++ b/src/c/specialFunctions/erf/derfs.c @@ -0,0 +1,22 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erf.h" + +double derfs(double inp1) +{ + return erf(inp1); +} + diff --git a/src/c/specialFunctions/erf/serfa.c b/src/c/specialFunctions/erf/serfa.c new file mode 100644 index 0000000..0db4a7b --- /dev/null +++ b/src/c/specialFunctions/erf/serfa.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erf.h" + +void serfa(float* inp1, int sizer, int sizec,float* out) +{ + for (int i = 0; i < sizer*sizec; i++) + { + out[i] = erf(inp1[i]); + } +} + diff --git a/src/c/specialFunctions/erf/serfs.c b/src/c/specialFunctions/erf/serfs.c new file mode 100644 index 0000000..66638a1 --- /dev/null +++ b/src/c/specialFunctions/erf/serfs.c @@ -0,0 +1,22 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erf.h" + +float serfs(float inp1) +{ + return erf(inp1); +} + diff --git a/src/c/specialFunctions/erfc/derfca.c b/src/c/specialFunctions/erfc/derfca.c new file mode 100644 index 0000000..85c92ef --- /dev/null +++ b/src/c/specialFunctions/erfc/derfca.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erfc.h" + +void derfca(double* inp1, int sizer, int sizec, double* out) +{ + for (int i = 0; i < sizer*sizec; i++) + { + out[i] = derfcs(inp1[i]); + } +} + diff --git a/src/c/specialFunctions/erfc/derfcs.c b/src/c/specialFunctions/erfc/derfcs.c new file mode 100644 index 0000000..31c9846 --- /dev/null +++ b/src/c/specialFunctions/erfc/derfcs.c @@ -0,0 +1,22 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erfc.h" + +double derfcs(double inp1) +{ + return (1-erf(inp1)); +} + diff --git a/src/c/specialFunctions/erfc/serfca.c b/src/c/specialFunctions/erfc/serfca.c new file mode 100644 index 0000000..469c5a1 --- /dev/null +++ b/src/c/specialFunctions/erfc/serfca.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erfc.h" + +void serfca(float* inp1, int sizer, int sizec, float* out) +{ + for (int i = 0; i < sizer*sizec; i++) + { + out[i] = serfcs(inp1[i]); + } +} + diff --git a/src/c/specialFunctions/erfc/serfcs.c b/src/c/specialFunctions/erfc/serfcs.c new file mode 100644 index 0000000..3f93a80 --- /dev/null +++ b/src/c/specialFunctions/erfc/serfcs.c @@ -0,0 +1,22 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erfc.h" + +float serfcs(float inp1) +{ + return (1-erf(inp1)); +} + diff --git a/src/c/specialFunctions/erfcx/derfcxa.c b/src/c/specialFunctions/erfcx/derfcxa.c new file mode 100644 index 0000000..d2cd750 --- /dev/null +++ b/src/c/specialFunctions/erfcx/derfcxa.c @@ -0,0 +1,26 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erfcx.h" +#include "erfc.h" + +void derfcxa(double* inp1, int sizer, int sizec, double* out) +{ + for (int i = 0; i < sizer*sizec; i++) + { + out[i] = derfcxs(inp1[i]); + } +} + diff --git a/src/c/specialFunctions/erfcx/derfcxs.c b/src/c/specialFunctions/erfcx/derfcxs.c new file mode 100644 index 0000000..ff12b2f --- /dev/null +++ b/src/c/specialFunctions/erfcx/derfcxs.c @@ -0,0 +1,23 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erfcx.h" +#include "erfc.h" + +double derfcxs(double inp1) +{ + return exp(inp1*inp1)*derfcs(inp1); +} + diff --git a/src/c/specialFunctions/erfcx/serfcxa.c b/src/c/specialFunctions/erfcx/serfcxa.c new file mode 100644 index 0000000..a28c30c --- /dev/null +++ b/src/c/specialFunctions/erfcx/serfcxa.c @@ -0,0 +1,26 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erfcx.h" +#include "erfc.h" + +void serfcxa(float* inp1, int sizer, int sizec, float* out) +{ + for (int i = 0; i < sizer*sizec; i++) + { + out[i] = serfcxs(inp1[i]); + } +} + diff --git a/src/c/specialFunctions/erfcx/serfcxs.c b/src/c/specialFunctions/erfcx/serfcxs.c new file mode 100644 index 0000000..be31a5a --- /dev/null +++ b/src/c/specialFunctions/erfcx/serfcxs.c @@ -0,0 +1,23 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erfcx.h" +#include "erfc.h" + +float serfcxs(float inp1) +{ + return exp(inp1*inp1)*derfcs(inp1); +} + diff --git a/src/c/specialFunctions/erfinv/derfinva.c b/src/c/specialFunctions/erfinv/derfinva.c new file mode 100644 index 0000000..45d119c --- /dev/null +++ b/src/c/specialFunctions/erfinv/derfinva.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erfinv.h" + +void derfinva(double* inp1, int sizer, int sizec,double* out) +{ + for (int i = 0; i < sizer*sizec; i++) + { + out[i] = derfinvs(inp1[i]); + } +} + diff --git a/src/c/specialFunctions/erfinv/derfinvs.c b/src/c/specialFunctions/erfinv/derfinvs.c new file mode 100644 index 0000000..3f7fe76 --- /dev/null +++ b/src/c/specialFunctions/erfinv/derfinvs.c @@ -0,0 +1,49 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erfinv.h" + +# define PI 3.1415927 + +double derfinvs (double inp1) +{ + double a[] = {0.88622692374517353,-1.6601283962374516,0.92661860147244357,-0.14110320437680104}; //Coefficients for the formula to calculate inverse error + double b[] = {-2.13505380615258078,1.46060340345661088,-0.33198239813321595,0.01197270616590528}; //Coefficients for the formula to calculate inverse error + double c[] = {-1.994216456587148,-1.87267416351196,3.60874665878559364,1.82365845766309853}; //Coefficients for the formula to calculate inverse error + double d[] = {3.74146294065960872,1.81848952562894617}; //Coefficients for the formula to calculate inverse error + + if ((inp1 > 1) || (inp1 < -1)) + { + return 0.0/0.0; // returns Nan + } + if ((inp1 >= -0.7) && (inp1 <= 0.7)) + { + double sq = inp1 * inp1; + return (inp1 * (((a[3]*sq+a[2]) * sq+a[1]) * sq+a[0]) / ((((b[3]*sq+b[2]) * sq+b[1]) * sq+b[0]) * sq+1)); //Inverse error formula + } + + else if ((inp1 > 0.7) && (inp1 < 1)) + { + double z = sqrt(-log((1-inp1)/2)); + return ((((c[3]*z+c[2]) * z+c[1]) * z+c[0]) / ((d[1]*z+d[0]) * z+1)); //Inverse error formula + } + + else if ((inp1 > -1) && (inp1 < 0.7)) + { + double z = sqrt(-log((1+inp1)/2)); + return (-(((c[3]*z+c[2]) * z+c[1]) * z+c[0]) / ((d[1]*z+d[0]) * z+1)); //Inverse error formula + } +} + diff --git a/src/c/specialFunctions/erfinv/serfinva.c b/src/c/specialFunctions/erfinv/serfinva.c new file mode 100644 index 0000000..3a14f3c --- /dev/null +++ b/src/c/specialFunctions/erfinv/serfinva.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erfinv.h" + +void serfinva(float* inp1, int sizer, int sizec,float* out) +{ + for (int i = 0; i < sizer*sizec; i++) + { + out[i] = serfinvs(inp1[i]); + } +} + diff --git a/src/c/specialFunctions/erfinv/serfinvs.c b/src/c/specialFunctions/erfinv/serfinvs.c new file mode 100644 index 0000000..5436fe3 --- /dev/null +++ b/src/c/specialFunctions/erfinv/serfinvs.c @@ -0,0 +1,50 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include "erfinv.h" + +# define PI 3.1415927 + +float serfinvs (float inp1) +{ + float a[] = {0.88622692374517353,-1.6601283962374516,0.92661860147244357,-0.14110320437680104}; //Coefficients for the formula to calculate inverse error + float b[] = {-2.13505380615258078,1.46060340345661088,-0.33198239813321595,0.01197270616590528}; //Coefficients for the formula to calculate inverse error + float c[] = {-1.994216456587148,-1.87267416351196,3.60874665878559364,1.82365845766309853}; //Coefficients for the formula to calculate inverse error + float d[] = {3.74146294065960872,1.81848952562894617}; //Coefficients for the formula to calculate inverse error + + if ((inp1 > 1) || (inp1 < -1)) + { + double na = 0.0/0.0; + return (float)na; + } + if ((inp1 >= -0.7) && (inp1 <= 0.7)) + { + float sq = inp1 * inp1; + return (inp1 * (((a[3]*sq+a[2]) * sq+a[1]) * sq+a[0]) / ((((b[3]*sq+b[2]) * sq+b[1]) * sq+b[0]) * sq+1)); //Inverse error formula + } + + else if ((inp1 > 0.7) && (inp1 < 1)) + { + float z = sqrt(-log((1-inp1)/2)); + return ((((c[3]*z+c[2]) * z+c[1]) * z+c[0]) / ((d[1]*z+d[0]) * z+1)); //Inverse error formula + } + + else if ((inp1 > -1) && (inp1 < 0.7)) + { + float z = sqrt(-log((1+inp1)/2)); + return (-(((c[3]*z+c[2]) * z+c[1]) * z+c[0]) / ((d[1]*z+d[0]) * z+1)); //Inverse error formula + } +} + diff --git a/src/c/specialFunctions/includes/erf.h b/src/c/specialFunctions/includes/erf.h new file mode 100644 index 0000000..86bb15d --- /dev/null +++ b/src/c/specialFunctions/includes/erf.h @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __ERF_H__ +#define __ERF_H__ +#include "types.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "uint8.h" +#include "uint16.h" +#include "int16.h" + +#ifdef __cplusplus +extern "C" { +#endif + +double derfs(double inp1); +float serfs(float inp1); +void derfa(double* inp1, int sizer, int sizec,double* out); +void serfa(float* inp1, int sizer, int sizec,float* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__ERF_H__*/ diff --git a/src/c/specialFunctions/includes/erfc.h b/src/c/specialFunctions/includes/erfc.h new file mode 100644 index 0000000..509e34e --- /dev/null +++ b/src/c/specialFunctions/includes/erfc.h @@ -0,0 +1,36 @@ + /* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ + +#ifndef __ERFC_H__ +#define __ERFC_H__ +#include "types.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "uint8.h" +#include "uint16.h" +#include "int16.h" + +#ifdef __cplusplus +extern "C" { +#endif + +double derfcs(double inp1); +void derfca(double* inp1, int sizer, int sizec,double* out); +float serfcs(float inp1); +void serfca(float* inp1, int sizer, int sizec, float* out); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__ERFC_H__*/ diff --git a/src/c/specialFunctions/includes/erfcx.h b/src/c/specialFunctions/includes/erfcx.h new file mode 100644 index 0000000..dd1e442 --- /dev/null +++ b/src/c/specialFunctions/includes/erfcx.h @@ -0,0 +1,37 @@ + /* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ + +#ifndef __ERFCX_H__ +#define __ERFCX_H__ +#include "types.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "uint8.h" +#include "uint16.h" +#include "int16.h" +#include "erfc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +double derfcxs(double inp1); +void derfcxa(double* inp1, int sizer, int sizec,double* out); +float serfcxs(float inp1); +void serfcxa(float* inp1, int sizer, int sizec, float* out); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__ERFCX_H__*/ diff --git a/src/c/specialFunctions/includes/erfinv.h b/src/c/specialFunctions/includes/erfinv.h new file mode 100644 index 0000000..5d6210c --- /dev/null +++ b/src/c/specialFunctions/includes/erfinv.h @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __ERFINV_H__ +#define __ERFINV_H__ +#include "types.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "uint8.h" +#include "uint16.h" +#include "int16.h" + +#ifdef __cplusplus +extern "C" { +#endif + +double derfinvs (double inp1); +float serfinvs (float inp1); +void derfinva(double* inp1, int sizer, int sizec,double* out); +void serfinva(float* inp1, int sizer, int sizec,float* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__ERFINV_H__*/ diff --git a/src/c/specialFunctions/interfaces/int_erf.h b/src/c/specialFunctions/interfaces/int_erf.h new file mode 100644 index 0000000..87f11f9 --- /dev/null +++ b/src/c/specialFunctions/interfaces/int_erf.h @@ -0,0 +1,32 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_ERF_H__ +#define __INT_ERF_H__ + +#ifdef __cplusplus +extern "C" { +#endif + + + +#define d0erfd0(in1) derfs(in1) +#define s0erfs0(in1) serfs(in1) +#define d2erfd2(in1,size,out) derfa(in1,size[0],size[1],out) +#define s2erfs2(in1,size,out) serfa(in1,size[0],size[1],out) + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_ERF_H__*/ diff --git a/src/c/specialFunctions/interfaces/int_erfc.h b/src/c/specialFunctions/interfaces/int_erfc.h new file mode 100644 index 0000000..64ae0fa --- /dev/null +++ b/src/c/specialFunctions/interfaces/int_erfc.h @@ -0,0 +1,32 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_ERFC_H__ +#define __INT_ERFC_H__ + +#ifdef __cplusplus +extern "C" { +#endif + + + +#define d0erfcd0(in1) derfcs(in1) +#define s0erfcs0(in1) serfcs(in1) +#define d2erfcd2(in1,size,out) derfca(in1,size[0],size[1],out) +#define s2erfcs2(in1,size,out) serfca(in1,size[0],size[1],out) + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_ERFC_H__*/ diff --git a/src/c/specialFunctions/interfaces/int_erfcx.h b/src/c/specialFunctions/interfaces/int_erfcx.h new file mode 100644 index 0000000..89840d4 --- /dev/null +++ b/src/c/specialFunctions/interfaces/int_erfcx.h @@ -0,0 +1,32 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_ERFCX_H__ +#define __INT_ERFCX_H__ + +#ifdef __cplusplus +extern "C" { +#endif + + + +#define d0erfcxd0(in1) derfcxs(in1) +#define s0erfcxs0(in1) serfcxs(in1) +#define d2erfcxd2(in1,size,out) derfcxa(in1,size[0],size[1],out) +#define s2erfcs2(in1,size,out) serfca(in1,size[0],size[1],out) + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_ERFCX_H__*/ diff --git a/src/c/specialFunctions/interfaces/int_erfinv.h b/src/c/specialFunctions/interfaces/int_erfinv.h new file mode 100644 index 0000000..f19baa1 --- /dev/null +++ b/src/c/specialFunctions/interfaces/int_erfinv.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Brijesh Gupta C R + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_ERFINV_H__ +#define __INT_ERFINV_H__ + +#ifdef __cplusplus +extern "C" { +#endif + + + +#define d0erfinvd0(in1) derfinvs(in1) +#define s0erfinvs0(in1) serfinvs(in1) +#define d2erfinvd2(in1,size,out) derfinva(in1,size[0],size[1],out) +#define s2erfinvs2(in1,size,out) serfinva(in1,size[0],size[1],out) + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_ERFINV_H__*/ |