File name: matematica.cpp/matematica.h


Variables



The presicion of the Taylor's power series
***********************************************************************
static int presicionTaylor = 14; //con 14 se obtiene una presicion aceptable para sen(360)


Functions



Effect: return the ceilling function of x
***********************************************************************
int techo(double x);


Effect: convert grades to radians
***********************************************************************
double gradosARadianes(double x);


Effect: return the square root of x
Require: non negative x
***********************************************************************
double raizCuadrada(double x);


Effect: return base^exponente
Require: 1<=exponente
***********************************************************************
double potencia(double base,int exponente);


Effect: return x!
Require: positive x
***********************************************************************
double factorial(int x);


Effect: return an approximation of sen(x) using Taylor's power
          series.
Require: x in radians
***********************************************************************
double seno(double x);


Effect: return an approximation of cos(x) using Taylor's power
          series.
Require: x in radians
***********************************************************************
double coseno(double x);


Effect: return x%y
Require: (x,y) > (0,0)
***********************************************************************
double mod(double x,double y);