M.Z.
This commit is contained in:
@@ -186,13 +186,11 @@ int StrPutInt(StrBuf *buf, int val, int sep) {
|
|||||||
int StrPutFloat(StrBuf *buf, float val, int sep) {
|
int StrPutFloat(StrBuf *buf, float val, int sep) {
|
||||||
char num[32];
|
char num[32];
|
||||||
int l;
|
int l;
|
||||||
double d;
|
|
||||||
|
|
||||||
if (val == MYC_NAN) {
|
if (val == MYC_NAN) {
|
||||||
ERR_I(StrPut(buf, "NaN", sep));
|
ERR_I(StrPut(buf, "NaN", sep));
|
||||||
} else {
|
} else {
|
||||||
d=val;
|
sprintf(num, "%g", val);
|
||||||
sprintf(num, "%g", d);
|
|
||||||
ERR_I(StrPut(buf, num, sep));
|
ERR_I(StrPut(buf, num, sep));
|
||||||
}
|
}
|
||||||
return(0);
|
return(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user