<div dir="ltr"><div>I care!   And I agree that this is an important thing to get right.</div><div><br></div><div>One thing that occurred to me is that the apparent semantic of the default output precision is not that useful.  Right now, at least according to the manual, the default output precision is explicitly specified as 15 decimal digits.  This is not useful, since it takes no account of the actual significant digits in the number being output.  </div><div><br></div><div>More useful IMO is that the default (if the precision is not provided) is to output a number with say 15 *significant* digits (i.e. including all digits in the number).  This means of course that the number of *decimal places* can vary between numbers, depending on their magnitude.  But if the user wanted a fixed number of decimal places they could have specified it explicitly.</div><div><br></div><div>This means that the default does not drop (or add) any digits.  Also, I believe this matches the semantics of most programming language floating point output routines. </div><div><br></div><div>And is it the case that this is how the routines work right now?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 17, 2020 at 6:16 AM <<a href="mailto:rmrodriguez@carto.com">rmrodriguez@carto.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I wanted to mention 2 things:<br>
First, I'm slightly worried that nobody cares about this. It makes me<br>
think that nobody cares about having a correct output for text output<br>
functions.<br>
<br>
Second, fixing the functions to output the requested (15 in most<br>
cases) decimal digits breaks the regression tests of any dependent<br>
project in many places. Not only that, but I think that having 15<br>
being the default doesn't make any sense as we ourselves are using 12<br>
digits (#define FP_TOLERANCE 1e-12) for tolerance and, for the common<br>
CRSs, it's enough precision to pinpoint a hair in my head. So if we<br>
decide to go that route it should be accompanied by a change in the<br>
default precision to something that makes more sense (8?).<br>
<br>
Any comments? If not I'll go trust my gut as soon as I have a sane CI<br>
passing (right now there appears to be multiple differences depending<br>
on the OS).<br>
<br><br></blockquote></div></div>