X-Git-Url: https://git.auder.net/?p=epclust.git;a=blobdiff_plain;f=data%2Fpreprocessing%2Fconvert_to_CSV.c;fp=data%2Fpreprocessing%2Fconvert_to_CSV.c;h=b3ff3be133ecc06f671507bb39080d0d3ed44682;hp=646c4407380ccf396971fc8d89bd96ace8537899;hb=e906736ea27105237e84c904dce6170353726292;hpb=57f337af19cd6251815bb1ff2d62f4c58e8b6078 diff --git a/data/preprocessing/convert_to_CSV.c b/data/preprocessing/convert_to_CSV.c index 646c440..b3ff3be 100644 --- a/data/preprocessing/convert_to_CSV.c +++ b/data/preprocessing/convert_to_CSV.c @@ -41,9 +41,10 @@ char readReal(FILE* stream, float* real) } if (curChar == 'e' || curChar == 'E') curChar = readInt(stream, &exponent); - *real = ( integerPart + (integerPart>0 ? 1. : -1.) * (float)fractionalPart + *real = ( integerPart + (integerPart>=0 ? 1. : -1.) * (float)fractionalPart / pow(10,countZeros+floor(log10(fractionalPart>0 ? fractionalPart : 1)+1)) ) * pow(10,exponent); + return curChar; //separator or endline }