StrF() and StrD() decimal places default change.
Posted: Mon Sep 20, 2010 3:26 am
Fred, any chance you could change the default for StrF() and StrD() to 7 and 15 decimal places respectively?
http://en.wikipedia.org/wiki/IEEE_float ... ic_formats
http://www.mathworks.com/help/techdoc/ref/format.html
The IEEE standards states that single float has 7.22 decimal precision and that double float has 15.95.
So therefore MATLAB rounds to 7 for singles and 15 for doubles. (If I recall correctly MySQL also does what MATLAB does.)
It kinda makes sense for the most common decimal places length to be the default.
Currently both StrF() and StrD() has a default of 10 decimal places.
http://en.wikipedia.org/wiki/IEEE_float ... ic_formats
http://www.mathworks.com/help/techdoc/ref/format.html
The IEEE standards states that single float has 7.22 decimal precision and that double float has 15.95.
So therefore MATLAB rounds to 7 for singles and 15 for doubles. (If I recall correctly MySQL also does what MATLAB does.)
It kinda makes sense for the most common decimal places length to be the default.
Currently both StrF() and StrD() has a default of 10 decimal places.