Index: /cpp/frams/Makefile-SDK-files
===================================================================
--- /cpp/frams/Makefile-SDK-files	(revision 825)
+++ /cpp/frams/Makefile-SDK-files	(revision 826)
@@ -2,5 +2,5 @@
 
 # ALL_DIRS is later expanded by the shell, no spaces/newlines allowed, or it breaks
-ALL_DIRS={common,frams,frams/canvas,frams/config,common/loggers,frams/genetics,frams/genetics/f0,frams/genetics/f1,frams/genetics/f2,frams/genetics/f3,frams/genetics/f4,frams/genetics/f5,frams/genetics/f6,frams/genetics/f7,frams/genetics/f8,frams/genetics/f9,frams/genetics/fn,frams/genetics/fF,frams/genetics/fT,frams/genetics/fB,frams/genetics/fH,frams/genetics/fL,frams/model,frams/neuro,frams/neuro/impl,frams/param,frams/test,frams/util,frams/vm/classes,common/virtfile,frams/_demos,frams/model/geometry,frams/_demos/geometry,frams/model/similarity,frams/model/similarity/SVD}
+ALL_DIRS={common,PrintFloat,frams,frams/canvas,frams/config,common/loggers,frams/genetics,frams/genetics/f0,frams/genetics/f1,frams/genetics/f2,frams/genetics/f3,frams/genetics/f4,frams/genetics/f5,frams/genetics/f6,frams/genetics/f7,frams/genetics/f8,frams/genetics/f9,frams/genetics/fn,frams/genetics/fF,frams/genetics/fT,frams/genetics/fB,frams/genetics/fH,frams/genetics/fL,frams/model,frams/neuro,frams/neuro/impl,frams/param,frams/test,frams/util,frams/vm/classes,common/virtfile,frams/_demos,frams/model/geometry,frams/_demos/geometry,frams/model/similarity,frams/model/similarity/SVD}
 
 GENMANF4=frams/genetics/f4/f4_oper.o
@@ -29,5 +29,7 @@
 GENMAN_COMMON_OBJS=frams/genetics/genman.o frams/param/mutableparam.o frams/param/mutparamlist.o frams/neuro/geneticneuroparam.o frams/neuro/neurolibparam.o
 
-SDK_OBJS=frams/util/list.o frams/util/advlist.o frams/param/param.o frams/util/sstring.o frams/util/sstringutils.o frams/util/3d.o frams/vm/classes/3dobject.o frams/model/model.o frams/model/modelparts.o frams/neuro/neurolibrary.o frams/genetics/geno.o frams/genetics/genoconv.o frams/util/extvalue.o frams/vm/classes/collectionobj.o frams/util/hashtable.o common/log.o common/stl-util.o common/nonstd_stdio.o frams/util/callbacks.o frams/param/syntparam.o frams/util/multirange.o frams/util/multimap.o frams/param/paramtabobj.o common/loggers/loggers.o frams/param/paramobj.o frams/genetics/genooperators.o common/nonstd_math.o frams/util/validitychecks.o common/Convert.o frams/util/rndutil.o common/virtfile/stringfile.o
+PRINTFLOAT_OBJS=PrintFloat/Math.o PrintFloat/Dragon4.o PrintFloat/PrintFloat.o
+
+SDK_OBJS=frams/util/list.o frams/util/advlist.o frams/param/param.o frams/util/sstring.o frams/util/sstringutils.o frams/util/3d.o frams/vm/classes/3dobject.o frams/model/model.o frams/model/modelparts.o frams/neuro/neurolibrary.o frams/genetics/geno.o frams/genetics/genoconv.o frams/util/extvalue.o frams/vm/classes/collectionobj.o frams/util/hashtable.o common/log.o common/stl-util.o common/nonstd_stdio.o frams/util/callbacks.o frams/param/syntparam.o frams/util/multirange.o frams/util/multimap.o frams/param/paramtabobj.o common/loggers/loggers.o frams/param/paramobj.o frams/genetics/genooperators.o common/nonstd_math.o frams/util/validitychecks.o common/Convert.o frams/util/rndutil.o common/virtfile/stringfile.o $(PRINTFLOAT_OBJS)
 
 GEOMETRY_OBJS=frams/model/geometry/meshbuilder.o frams/model/geometry/modelgeometryinfo.o frams/model/geometry/geometryutils.o
Index: /cpp/frams/config/sdk_build_config.h
===================================================================
--- /cpp/frams/config/sdk_build_config.h	(revision 825)
+++ /cpp/frams/config/sdk_build_config.h	(revision 826)
@@ -14,4 +14,5 @@
 #endif
 
+#define USE_PRINTFLOAT_DRAGON4
 #define NOCREATUREOBJECT
 #define SDK_WITHOUT_FRAMS
Index: /cpp/frams/util/sstring-simple.cpp
===================================================================
--- /cpp/frams/util/sstring-simple.cpp	(revision 825)
+++ /cpp/frams/util/sstring-simple.cpp	(revision 826)
@@ -3,4 +3,7 @@
 #include "extvalue.h"
 #include <assert.h>
+#ifdef USE_PRINTFLOAT_DRAGON4
+#include <PrintFloat/PrintFloat.h>
+#endif
 
 void SString::initEmpty()
@@ -224,5 +227,14 @@
 SString SString::valueOf(double d)
 {
-	SString tmp = SString::sprintf("%.15g", d);
+#ifdef USE_PRINTFLOAT_DRAGON4
+	SString tmp;
+	char* here = tmp.directWrite(30);
+	tmp.endWrite(PrintFloat64(here, 30, d,
+		((d < -1e17) || (d > 1e17) || ((d < 1e-4) && (d > -1e-4) && (d != 0.0)))
+		? PrintFloatFormat_Scientific : PrintFloatFormat_Positional,
+		-1));//http://www.ryanjuckett.com/programming/printing-floating-point-numbers/
+#else
+	SString tmp = SString::sprintf("%.17g", d); //https://stackoverflow.com/questions/16839658/printf-width-specifier-to-maintain-precision-of-floating-point-value
+#endif
 	if ((!strchr(tmp.c_str(), '.')) && (!strchr(tmp.c_str(), 'e'))) tmp += ".0";
 	return tmp;
Index: /cpp/frams/util/sstring.cpp
===================================================================
--- /cpp/frams/util/sstring.cpp	(revision 825)
+++ /cpp/frams/util/sstring.cpp	(revision 826)
@@ -23,4 +23,7 @@
 #include "extvalue.h"
 #include <assert.h>
+#ifdef USE_PRINTFLOAT_DRAGON4
+#include <PrintFloat/PrintFloat.h>
+#endif
 
 #ifdef MULTITHREADED
@@ -363,5 +366,14 @@
 SString SString::valueOf(double d)
 {
-	SString tmp = SString::sprintf("%.15g", d);
+#ifdef USE_PRINTFLOAT_DRAGON4
+	SString tmp;
+	char* here=tmp.directWrite(30);
+	tmp.endWrite(PrintFloat64(here,30,d,
+				  ((d<-1e17)||(d>1e17)||((d<1e-4)&&(d>-1e-4)&&(d!=0.0)))
+				  ? PrintFloatFormat_Scientific : PrintFloatFormat_Positional,
+				  -1));//http://www.ryanjuckett.com/programming/printing-floating-point-numbers/
+#else
+	SString tmp = SString::sprintf("%.17g", d); //https://stackoverflow.com/questions/16839658/printf-width-specifier-to-maintain-precision-of-floating-point-value
+#endif
 	if ((!strchr(tmp.c_str(), '.')) && (!strchr(tmp.c_str(), 'e'))) tmp += ".0";
 	return tmp;
