1 #include "../include/Matematica.h" 3 void SigErr(
int IsWrong,
const char * s, ...){
8 fprintf(stderr,
"Error: ");
9 vfprintf(stderr, s, args);
10 fprintf(stderr,
"exiting the program\n");
18 void abort_(
const char * s, ...)
23 vfprintf(stderr, s, args);
24 fprintf(stderr,
"\n");
31 void Message(
const char * s, ...)
36 vfprintf(stderr, s, args);
37 fprintf(stderr,
"\n");
45 (void)time(&TempoSeme);
46 int seme = (int)(TempoSeme);
51 rng = (gsl_rng *)malloc(
sizeof(gsl_rng));
52 rng = gsl_rng_alloc(gsl_rng_mt19937);
54 gsl_rng_set(rng, seme);
58 unsigned long Seed = (
unsigned long)Now;
59 init_genrand( Seed ) ;
60 seme = (int)TempoSeme;
78 Matematica::~Matematica(){
85 printf(
"the number is negative %d\n",times);
87 for(
int t=1;t<times;t++){
97 int NumeroStringa(
const char *NumeroC){
101 int Potenza = strlen(NumeroC);
102 for(
int j=0;j<Potenza;j++){
137 for(
int i=Potenza-j;i>1;i--)
139 Numero+=Cifra*FattoreDieci;
double Binomial(int times, int n)
For the BSpline.
int Factorial(int times)
Computes.
void Derivata(double *st, double *sw, int NMass)
Derivate of.
FUNC Func
Pointer to a function.
double ContactAngle(double x)
Definition of the contact angle.
double a2
a0 + a1*x + a2*x^2 + a3*x^3 + a4^4
double a1
a0 + a1*x + a2*x^2 + a3*x^3 + a4^4