Main Page | Alphabetical List | Class List | File List | Class Members | File Members

Trigonometry.h

Go to the documentation of this file.
00001 #ifndef TRIGONOMETRY_H
00002 #define TRIGONOMETRY_H
00003 
00004 
00005 // ----------------------------------------------------------------------
00006 //
00007 // Bridge object between C++ code and the GSL Trigonometry functions
00008 //
00009 // ----------------------------------------------------------------------
00010 
00011 #ifndef ZMENVIRONMENT_H
00012   #include "ZMutility/ZMenvironment.h"
00013 #endif
00014 #include <utility>
00015 #include <complex>
00016 
00017 ZM_BEGIN_NAMESPACE( zmsf )      /*  namespace zmsf  {  */
00018 
00019 typedef std::pair<double,double> Dpair;
00020 typedef std::complex<double> Dcomplex;
00021 typedef std::pair<Dcomplex,Dcomplex> Cpair;
00022 
00027 
00028 struct Trigonometry {
00029 
00031   static double Sin( const double x );
00032 
00034   static Dpair SinErr( const double x ); 
00035 
00037   static double Cos( const double x );
00038 
00040   static Dpair CosErr( const double x );
00041 
00043   static double Hypot( const double x, double y );
00044 
00046   static Dpair HypotErr( const double x, double y );
00047 
00049   static Dcomplex Sin( const Dcomplex z );
00050 
00052   static Cpair SinErr( const Dcomplex z ); 
00053 
00055   static Dcomplex Cos( const Dcomplex z );
00056 
00058   static Cpair CosErr( const Dcomplex z ); 
00059 
00061   static Dcomplex lnSin( const Dcomplex x );
00062 
00064   static Cpair lnSinErr( const Dcomplex x );
00065 
00067   static double Sinc( const double x );
00068 
00070   static Dpair SincErr( const double x );
00071 
00073   static double lnSinh( const double x );
00074 
00076   static Dpair lnSinhErr( const double x );
00077 
00079   static double lnCosh( const double x );
00080 
00082   static Dpair lnCoshErr( const double x );
00083 
00085   static Dpair PolarToRect( Dpair rtheta );
00086 
00088   static Dpair PolarToRectErr( Dpair rtheta, double& dx, double& dy );
00089 
00091   static Dpair RectToPolar( Dpair xy );
00092 
00094   static Dpair RectToPolarErr( Dpair xy, double& dr, double& dtheta );
00095 
00097   static Dpair Sin( const double x, const double dx );
00098 
00100   static Dpair Cos( const double x, const double dx );
00101 
00103   static double StandardizeSymm( const double theta );
00104 
00106   static Dpair StandardizeSymmErr( const double theta );
00107 
00109   static double StandardizePos( const double theta );
00110 
00112   static Dpair StandardizePosErr( const double theta );
00113 
00114 };  // Trigonometry
00115 
00116 ZM_END_NAMESPACE( zmsf )        /*  }  // namespace zmsf  */
00117 
00118 #endif  /* TRIGONOMETRY_H */

Generated on Wed Feb 25 15:03:17 2004 for SpecialFunctions by doxygen 1.3.4