75
75
void assign(const int n) {v = (long double)n; }
76
76
void multiply(const int n) {v *= (long double)n; }
77
80
int print(FILE *fp) {return fprintf(fp, "%Lg", v); }
78
82
int tostring(char **str) {
79
83
int size=static_cast<int>( (logbl(fabsl(v))/log(10.0))+4 );
80
84
*str=igraph_Calloc(size, char );
82
86
IGRAPH_ERROR("Cannot convert big number to string", IGRAPH_ENOMEM);
89
snprintf(*str, size, "%.0f", (double)v);
84
91
snprintf(*str, size, "%.0Lf", v);