orsa_secure_math.h

Go to the documentation of this file.
00001 /* 
00002    ORSA - Orbit Reconstruction, Simulation and Analysis
00003    Copyright (C) 2002-2004 Pasquale Tricarico
00004    
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU General Public License
00007    as published by the Free Software Foundation; either version 2
00008    of the License, or (at your option) any later version.
00009    
00010    As a special exception, Pasquale Tricarico gives permission to
00011    link this program with Qt commercial edition, and distribute the
00012    resulting executable, without including the source code for the Qt
00013    commercial edition in the source distribution.
00014    
00015    This program is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018    GNU General Public License for more details.
00019    
00020    You should have received a copy of the GNU General Public License
00021    along with this program; if not, write to the Free Software
00022    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 */
00024 
00025 #ifndef _ORSA_SECURE_MATH_H_
00026 #define _ORSA_SECURE_MATH_H_
00027 
00028 namespace orsa {
00029   
00030   // avoids domain errors when x<0 and non-integer y
00031   double secure_pow(double x, double y);
00032   
00033   // avoids domain errors when x<=0
00034   double secure_log(double x);
00035   
00036   // avoids domain errors when x<=0
00037   double secure_log10(double x);
00038   
00039   // avoids domain errors when x=y=0
00040   double secure_atan2(double x, double y);
00041   
00042   // avoids domain errors when x is not in [-1,1]
00043   double secure_asin(double x);
00044   
00045   // avoids domain errors when x is not in [-1,1]
00046   double secure_acos(double x);
00047   
00048   // avoids domain errors when x<0
00049   double secure_sqrt(double x);
00050   
00051 } // namespace orsa 
00052 
00053 #endif // _ORSA_SECURE_MATH_H_

Generated on Fri Nov 3 20:37:42 2006 for liborsa by  doxygen 1.4.7