Blame gsl/gsl_sf_trig.h

Packit e8bc57
/* specfunc/gsl_sf_trig.h
Packit e8bc57
 * 
Packit e8bc57
 * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman
Packit e8bc57
 * 
Packit e8bc57
 * This program is free software; you can redistribute it and/or modify
Packit e8bc57
 * it under the terms of the GNU General Public License as published by
Packit e8bc57
 * the Free Software Foundation; either version 2 of the License, or (at
Packit e8bc57
 * your option) any later version.
Packit e8bc57
 * 
Packit e8bc57
 * This program is distributed in the hope that it will be useful, but
Packit e8bc57
 * WITHOUT ANY WARRANTY; without even the implied warranty of
Packit e8bc57
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit e8bc57
 * General Public License for more details.
Packit e8bc57
 * 
Packit e8bc57
 * You should have received a copy of the GNU General Public License
Packit e8bc57
 * along with this program; if not, write to the Free Software
Packit e8bc57
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Packit e8bc57
 */
Packit e8bc57
Packit e8bc57
/* Author:  G. Jungman */
Packit e8bc57
Packit e8bc57
#ifndef __GSL_SF_TRIG_H__
Packit e8bc57
#define __GSL_SF_TRIG_H__
Packit e8bc57
Packit e8bc57
#include <gsl/gsl_sf_result.h>
Packit e8bc57
Packit e8bc57
#undef __BEGIN_DECLS
Packit e8bc57
#undef __END_DECLS
Packit e8bc57
#ifdef __cplusplus
Packit e8bc57
# define __BEGIN_DECLS extern "C" {
Packit e8bc57
# define __END_DECLS }
Packit e8bc57
#else
Packit e8bc57
# define __BEGIN_DECLS /* empty */
Packit e8bc57
# define __END_DECLS /* empty */
Packit e8bc57
#endif
Packit e8bc57
Packit e8bc57
__BEGIN_DECLS
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Sin(x) with GSL semantics. This is actually important
Packit e8bc57
 * because we want to control the error estimate, and trying
Packit e8bc57
 * to guess the error for the standard library implementation
Packit e8bc57
 * every time it is used would be a little goofy.
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_sin_e(double x, gsl_sf_result * result);
Packit e8bc57
double gsl_sf_sin(const double x);
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Cos(x) with GSL semantics.
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_cos_e(double x, gsl_sf_result * result);
Packit e8bc57
double gsl_sf_cos(const double x);
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Hypot(x,y) with GSL semantics.
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_hypot_e(const double x, const double y, gsl_sf_result * result);
Packit e8bc57
double gsl_sf_hypot(const double x, const double y);
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Sin(z) for complex z
Packit e8bc57
 *
Packit e8bc57
 * exceptions: GSL_EOVRFLW
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_complex_sin_e(const double zr, const double zi, gsl_sf_result * szr, gsl_sf_result * szi);
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Cos(z) for complex z
Packit e8bc57
 *
Packit e8bc57
 * exceptions: GSL_EOVRFLW
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_complex_cos_e(const double zr, const double zi, gsl_sf_result * czr, gsl_sf_result * czi);
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Log(Sin(z)) for complex z
Packit e8bc57
 *
Packit e8bc57
 * exceptions: GSL_EDOM, GSL_ELOSS
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_complex_logsin_e(const double zr, const double zi, gsl_sf_result * lszr, gsl_sf_result * lszi);
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Sinc(x) = sin(pi x) / (pi x)
Packit e8bc57
 *
Packit e8bc57
 * exceptions: none
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_sinc_e(double x, gsl_sf_result * result);
Packit e8bc57
double gsl_sf_sinc(const double x);
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Log(Sinh(x)), x > 0
Packit e8bc57
 *
Packit e8bc57
 * exceptions: GSL_EDOM
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_lnsinh_e(const double x, gsl_sf_result * result);
Packit e8bc57
double gsl_sf_lnsinh(const double x);
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Log(Cosh(x))
Packit e8bc57
 *
Packit e8bc57
 * exceptions: none
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_lncosh_e(const double x, gsl_sf_result * result);
Packit e8bc57
double gsl_sf_lncosh(const double x);
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Convert polar to rectlinear coordinates.
Packit e8bc57
 *
Packit e8bc57
 * exceptions: GSL_ELOSS
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_polar_to_rect(const double r, const double theta, gsl_sf_result * x, gsl_sf_result * y);
Packit e8bc57
Packit e8bc57
/* Convert rectilinear to polar coordinates.
Packit e8bc57
 * return argument in range [-pi, pi]
Packit e8bc57
 *
Packit e8bc57
 * exceptions: GSL_EDOM
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_rect_to_polar(const double x, const double y, gsl_sf_result * r, gsl_sf_result * theta);
Packit e8bc57
Packit e8bc57
/* Sin(x) for quantity with an associated error.
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_sin_err_e(const double x, const double dx, gsl_sf_result * result);
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Cos(x) for quantity with an associated error.
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_cos_err_e(const double x, const double dx, gsl_sf_result * result);
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Force an angle to lie in the range (-pi,pi].
Packit e8bc57
 *
Packit e8bc57
 * exceptions: GSL_ELOSS
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_angle_restrict_symm_e(double * theta);
Packit e8bc57
double gsl_sf_angle_restrict_symm(const double theta);
Packit e8bc57
Packit e8bc57
Packit e8bc57
/* Force an angle to lie in the range [0, 2pi)
Packit e8bc57
 *
Packit e8bc57
 * exceptions: GSL_ELOSS
Packit e8bc57
 */
Packit e8bc57
int gsl_sf_angle_restrict_pos_e(double * theta);
Packit e8bc57
double gsl_sf_angle_restrict_pos(const double theta);
Packit e8bc57
Packit e8bc57
Packit e8bc57
int gsl_sf_angle_restrict_symm_err_e(const double theta, gsl_sf_result * result);
Packit e8bc57
Packit e8bc57
int gsl_sf_angle_restrict_pos_err_e(const double theta, gsl_sf_result * result);
Packit e8bc57
Packit e8bc57
Packit e8bc57
__END_DECLS
Packit e8bc57
Packit e8bc57
#endif /* __GSL_SF_TRIG_H__ */