ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
sf_trig.hpp
Go to the documentation of this file.
1/*
2 * $Id: sf_trig.hpp 9 2010-06-13 14:02:43Z jdl3 $
3 * Copyright (C) 2010, 2020 John D Lamb
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20#ifndef CCGSL_SF_TRIG_HPP
21#define CCGSL_SF_TRIG_HPP
22
23#include<gsl/gsl_sf_trig.h>
24#include"mode.hpp"
25#include"sf_result.hpp"
26
27namespace gsl {
28 namespace sf {
35 inline int sin_e( double x, result& result ){ return gsl_sf_sin_e( x, &result ); }
41 inline double sin( double const x ){ return gsl_sf_sin( x ); }
48 inline int cos_e( double x, result& result ){ return gsl_sf_cos_e( x, &result ); }
54 inline double cos( double const x ){ return gsl_sf_cos( x ); }
62 inline int hypot_e( double const x, double const y, result& result ){
63 return gsl_sf_hypot_e( x, y, &result ); }
70 inline double hypot( double const x, double const y ){ return gsl_sf_hypot( x, y ); }
79 inline int complex_sin_e( double const zr, double const zi, result& szr, result& szi ){
80 return gsl_sf_complex_sin_e( zr, zi, &szr, &szi ); }
89 inline int complex_cos_e( double const zr, double const zi, result& czr, result& czi ){
90 return gsl_sf_complex_cos_e( zr, zi, &czr, &czi ); }
99 inline int complex_logsin_e( double const zr, double const zi, result& lszr, result& lszi ){
100 return gsl_sf_complex_logsin_e( zr, zi, &lszr, &lszi ); }
108 inline int sinc_e( double x, result& result ){ return gsl_sf_sinc_e( x, &result ); }
115 inline double sinc( double const x ){ return gsl_sf_sinc( x ); }
123 inline int lnsinh_e( double const x, result& result ){ return gsl_sf_lnsinh_e( x, &result ); }
130 inline double lnsinh( double const x ){ return gsl_sf_lnsinh( x ); }
138 inline int lncosh_e( double const x, result& result ){ return gsl_sf_lncosh_e( x, &result ); }
145 inline double lncosh( double const x ){ return gsl_sf_lncosh( x ); }
154 inline int polar_to_rect( double const r, double const theta, result& x, result& y ){
155 return gsl_sf_polar_to_rect( r, theta, &x, &y ); }
164 inline int rect_to_polar( double const x, double const y, result& r, result& theta ){
165 return gsl_sf_rect_to_polar( x, y, &r, &theta ); }
174 inline int sin_err_e( double const x, double const dx, result& result ){
175 return gsl_sf_sin_err_e( x, dx, &result ); }
184 inline int cos_err_e( double const x, double const dx, result& result ){
185 return gsl_sf_cos_err_e( x, dx, &result ); }
186#ifndef DOXYGEN_SKIP
193 inline int angle_restrict_symm_e( double* theta ){
194 return gsl_sf_angle_restrict_symm_e( theta ); }
195#endif // DOXYGEN_SKIP
202 inline int angle_restrict_symm_e( double& theta ){
203 return gsl_sf_angle_restrict_symm_e( &theta ); }
210 inline double angle_restrict_symm( double const theta ){
211 return gsl_sf_angle_restrict_symm( theta ); }
212#ifndef DOXYGEN_SKIP
219 inline int angle_restrict_pos_e( double* theta ){
220 return gsl_sf_angle_restrict_pos_e( theta ); }
221#endif // DOXYGEN_SKIP
228 inline int angle_restrict_pos_e( double& theta ){
229 return gsl_sf_angle_restrict_pos_e( &theta ); }
236 inline double angle_restrict_pos( double const theta ){
237 return gsl_sf_angle_restrict_pos( theta ); }
244 inline int angle_restrict_symm_err_e( double const theta, result& result ){
245 return gsl_sf_angle_restrict_symm_err_e( theta, &result ); }
252 inline int angle_restrict_pos_err_e( double const theta, result& result ){
253 return gsl_sf_angle_restrict_pos_err_e( theta, &result ); }
254 }
255}
256
257#endif
double sin(double const x)
C++ version of gsl_sf_sin().
Definition: sf_trig.hpp:41
double lnsinh(double const x)
C++ version of gsl_sf_lnsinh().
Definition: sf_trig.hpp:130
int polar_to_rect(double const r, double const theta, result &x, result &y)
C++ version of gsl_sf_polar_to_rect().
Definition: sf_trig.hpp:154
int lnsinh_e(double const x, result &result)
C++ version of gsl_sf_lnsinh_e().
Definition: sf_trig.hpp:123
int cos_e(double x, result &result)
C++ version of gsl_sf_cos_e().
Definition: sf_trig.hpp:48
int rect_to_polar(double const x, double const y, result &r, result &theta)
C++ version of gsl_sf_rect_to_polar().
Definition: sf_trig.hpp:164
int complex_sin_e(double const zr, double const zi, result &szr, result &szi)
C++ version of gsl_sf_complex_sin_e().
Definition: sf_trig.hpp:79
int hypot_e(double const x, double const y, result &result)
C++ version of gsl_sf_hypot_e().
Definition: sf_trig.hpp:62
int angle_restrict_pos_e(double &theta)
C++ version of gsl_sf_angle_restrict_pos_e().
Definition: sf_trig.hpp:228
double cos(double const x)
C++ version of gsl_sf_cos().
Definition: sf_trig.hpp:54
int angle_restrict_symm_err_e(double const theta, result &result)
C++ version of gsl_sf_angle_restrict_symm_err_e().
Definition: sf_trig.hpp:244
double lncosh(double const x)
C++ version of gsl_sf_lncosh().
Definition: sf_trig.hpp:145
int cos_err_e(double const x, double const dx, result &result)
C++ version of gsl_sf_cos_err_e().
Definition: sf_trig.hpp:184
int sin_err_e(double const x, double const dx, result &result)
C++ version of gsl_sf_sin_err_e().
Definition: sf_trig.hpp:174
int angle_restrict_pos_err_e(double const theta, result &result)
C++ version of gsl_sf_angle_restrict_pos_err_e().
Definition: sf_trig.hpp:252
int complex_logsin_e(double const zr, double const zi, result &lszr, result &lszi)
C++ version of gsl_sf_complex_logsin_e().
Definition: sf_trig.hpp:99
double angle_restrict_symm(double const theta)
C++ version of gsl_sf_angle_restrict_symm().
Definition: sf_trig.hpp:210
int sin_e(double x, result &result)
C++ version of gsl_sf_sin_e().
Definition: sf_trig.hpp:35
double sinc(double const x)
C++ version of gsl_sf_sinc().
Definition: sf_trig.hpp:115
int angle_restrict_symm_e(double &theta)
C++ version of gsl_sf_angle_restrict_symm_e().
Definition: sf_trig.hpp:202
double hypot(double const x, double const y)
C++ version of gsl_sf_hypot().
Definition: sf_trig.hpp:70
int lncosh_e(double const x, result &result)
C++ version of gsl_sf_lncosh_e().
Definition: sf_trig.hpp:138
int complex_cos_e(double const zr, double const zi, result &czr, result &czi)
C++ version of gsl_sf_complex_cos_e().
Definition: sf_trig.hpp:89
double angle_restrict_pos(double const theta)
C++ version of gsl_sf_angle_restrict_pos().
Definition: sf_trig.hpp:236
int sinc_e(double x, result &result)
C++ version of gsl_sf_sinc_e().
Definition: sf_trig.hpp:108
gsl_sf_result result
Typedef for gsl_sf_result.
Definition: sf_result.hpp:30
The gsl package creates an interface to the GNU Scientific Library for C++.
Definition: blas.hpp:34