problem with std.variant rounding

Suliman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 28 08:45:25 PDT 2017


I am using https://github.com/mysql-d/mysql-native
It's return from DB variant data-type.

My DB include value: 56.051151 (double type in DB)

I need to extract it. I tried several variants:

writeln(point[3].coerce!float);
writeln(point[3].coerce!string);
writeln(point[3].coerce!double);

but all of them return me it as: 56.0512

How to return exactly 56.051151 ?


More information about the Digitalmars-d-learn mailing list