Imported Upstream version 4.6.0
[debian/atlc] / src / non_gui / gsl_definitions.h
1 /*
2 atlc - arbitrary transmission line calculator, for the analysis of
3 transmission lines are directional couplers. 
4
5 Copyright (C) 2002. Dr. David Kirkby, PhD (G8WRB).
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either package_version 2
10 of the License, or (at your option) any later package_version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
20 USA.
21
22 Dr. David Kirkby, e-mail drkirkby at ntlworld.com 
23
24 */
25
26 /*
27 The following code is taken from the GNU Scientifi Library, gsl, 
28 which is also issued under the GPL. 
29
30 */
31 #define GSL_PREC_DOUBLE                    0
32 #define GSL_SUCCESS                      0
33 /*
34 These values suita IEEE machines but might be too large 
35 for non-IEEE machines. Since I don't think its that 
36 important, I've changed the values a bit to be sure
37 double will work out okay. 
38
39 #define GSL_DBL_EPSILON        2.2204460492503131e-16
40 #define GSL_SQRT_DBL_EPSILON   1.4901161193847656e-08
41 #define GSL_DBL_MIN        2.2250738585072014e-308
42 #define GSL_DBL_MAX        1.7976931348623157e+308
43 */
44
45 #define GSL_DBL_EPSILON        1e-14
46 #define GSL_SQRT_DBL_EPSILON   1e-7
47 #define GSL_DBL_MIN        1e-100
48 #define GSL_DBL_MAX        1e+100
49
50 #define GSL_MODE_PREC(mt) ((mt) & (unsigned int)7)
51 #define GSL_MAX(a,b) ((a) > (b) ? (a) : (b))
52 /* GSL_VAR const double gsl_prec_eps[]; */
53
54 typedef unsigned int gsl_mode_t;
55 typedef unsigned int gsl_prec_t;
56
57 typedef struct
58 {
59   double val;
60   double err;
61 } gsl_sf_result;
62
63 double gsl_sf_ellint_Kcomp(double k, gsl_mode_t mode);
64 int gsl_sf_ellint_Kcomp_e(double k, gsl_mode_t mode, gsl_sf_result * result);
65 int gsl_sf_ellint_RF_e(double x, double y, double z, gsl_mode_t mode, gsl_sf_result * result);
66 double locMAX3(double x, double y, double z);
67
68
69 /* End of things taken from gsl library */