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.
StrF() and StrD() decimal places default change.
-
- Addict
- Posts: 4779
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: StrF() and StrD() decimal places default change.
I agree.Rescator wrote:Fred, any chance you could change the default for StrF() and StrD() to 7 and 15 decimal places respectively?
It makes sense to return the maximum possible number of decimal places of the respective format by default -- but not more than the maximum possible number.

Regards, Little John
Re: StrF() and StrD() decimal places default change.
A good, sensible request.