31 return double(rand())/RAND_MAX;
35char* strdup(
const char* str)
37 size_t len = strlen(str);
38 char* x = (
char*)malloc(len + 1);
41 memcpy(x, str, len + 1);
48double atanh(
const double& x)
51 if(!(x>-1.0 && x<1.0))
return sqrt(-1.0);
52 return log((1.0+x)/(1.0-x))/2.0;
67#if defined(_CSH_) || defined(linux) || defined(cygwin) || defined(MICROSOFT)
75#if defined(_CSH_) || defined(linux) || defined(cygwin) || defined(MICROSOFT) || defined(__APPLE__)
81 _getcwd(buf, longueur);
83#if defined(_CSH_) || defined(linux) || defined(cygwin) || defined(__APPLE__)
85 if (getcwd(buf, longueur)==
nullptr)
87 cerr <<
"getcwd returns an error code." << endl;
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.