Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:03:53

0001 /* specfunc/gsl_sf_trig.h
0002  * 
0003  * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman
0004  * 
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 3 of the License, or (at
0008  * your option) any later version.
0009  * 
0010  * This program is distributed in the hope that it will be useful, but
0011  * WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * General Public License for more details.
0014  * 
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program; if not, write to the Free Software
0017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0018  */
0019 
0020 /* Author:  G. Jungman */
0021 
0022 #ifndef __GSL_SF_TRIG_H__
0023 #define __GSL_SF_TRIG_H__
0024 
0025 #include <gsl/gsl_sf_result.h>
0026 
0027 #undef __BEGIN_DECLS
0028 #undef __END_DECLS
0029 #ifdef __cplusplus
0030 # define __BEGIN_DECLS extern "C" {
0031 # define __END_DECLS }
0032 #else
0033 # define __BEGIN_DECLS /* empty */
0034 # define __END_DECLS /* empty */
0035 #endif
0036 
0037 __BEGIN_DECLS
0038 
0039 
0040 /* Sin(x) with GSL semantics. This is actually important
0041  * because we want to control the error estimate, and trying
0042  * to guess the error for the standard library implementation
0043  * every time it is used would be a little goofy.
0044  */
0045 int gsl_sf_sin_e(double x, gsl_sf_result * result);
0046 double gsl_sf_sin(const double x);
0047 
0048 
0049 /* Cos(x) with GSL semantics.
0050  */
0051 int gsl_sf_cos_e(double x, gsl_sf_result * result);
0052 double gsl_sf_cos(const double x);
0053 
0054 
0055 /* Hypot(x,y) with GSL semantics.
0056  */
0057 int gsl_sf_hypot_e(const double x, const double y, gsl_sf_result * result);
0058 double gsl_sf_hypot(const double x, const double y);
0059 
0060 
0061 /* Sin(z) for complex z
0062  *
0063  * exceptions: GSL_EOVRFLW
0064  */
0065 int gsl_sf_complex_sin_e(const double zr, const double zi, gsl_sf_result * szr, gsl_sf_result * szi);
0066 
0067 
0068 /* Cos(z) for complex z
0069  *
0070  * exceptions: GSL_EOVRFLW
0071  */
0072 int gsl_sf_complex_cos_e(const double zr, const double zi, gsl_sf_result * czr, gsl_sf_result * czi);
0073 
0074 
0075 /* Log(Sin(z)) for complex z
0076  *
0077  * exceptions: GSL_EDOM, GSL_ELOSS
0078  */
0079 int gsl_sf_complex_logsin_e(const double zr, const double zi, gsl_sf_result * lszr, gsl_sf_result * lszi);
0080 
0081 
0082 /* Sinc(x) = sin(pi x) / (pi x)
0083  *
0084  * exceptions: none
0085  */
0086 int gsl_sf_sinc_e(double x, gsl_sf_result * result);
0087 double gsl_sf_sinc(const double x);
0088 
0089 
0090 /* Log(Sinh(x)), x > 0
0091  *
0092  * exceptions: GSL_EDOM
0093  */
0094 int gsl_sf_lnsinh_e(const double x, gsl_sf_result * result);
0095 double gsl_sf_lnsinh(const double x);
0096 
0097 
0098 /* Log(Cosh(x))
0099  *
0100  * exceptions: none
0101  */
0102 int gsl_sf_lncosh_e(const double x, gsl_sf_result * result);
0103 double gsl_sf_lncosh(const double x);
0104 
0105 
0106 /* Convert polar to rectlinear coordinates.
0107  *
0108  * exceptions: GSL_ELOSS
0109  */
0110 int gsl_sf_polar_to_rect(const double r, const double theta, gsl_sf_result * x, gsl_sf_result * y);
0111 
0112 /* Convert rectilinear to polar coordinates.
0113  * return argument in range [-pi, pi]
0114  *
0115  * exceptions: GSL_EDOM
0116  */
0117 int gsl_sf_rect_to_polar(const double x, const double y, gsl_sf_result * r, gsl_sf_result * theta);
0118 
0119 /* Sin(x) for quantity with an associated error.
0120  */
0121 int gsl_sf_sin_err_e(const double x, const double dx, gsl_sf_result * result);
0122 
0123 
0124 /* Cos(x) for quantity with an associated error.
0125  */
0126 int gsl_sf_cos_err_e(const double x, const double dx, gsl_sf_result * result);
0127 
0128 
0129 /* Force an angle to lie in the range (-pi,pi].
0130  *
0131  * exceptions: GSL_ELOSS
0132  */
0133 int gsl_sf_angle_restrict_symm_e(double * theta);
0134 double gsl_sf_angle_restrict_symm(const double theta);
0135 
0136 
0137 /* Force an angle to lie in the range [0, 2pi)
0138  *
0139  * exceptions: GSL_ELOSS
0140  */
0141 int gsl_sf_angle_restrict_pos_e(double * theta);
0142 double gsl_sf_angle_restrict_pos(const double theta);
0143 
0144 
0145 int gsl_sf_angle_restrict_symm_err_e(const double theta, gsl_sf_result * result);
0146 
0147 int gsl_sf_angle_restrict_pos_err_e(const double theta, gsl_sf_result * result);
0148 
0149 
0150 __END_DECLS
0151 
0152 #endif /* __GSL_SF_TRIG_H__ */