On Tue, Mar 10, 2020 at 10:31 AM Brett Nemeroff <br...@nemeroff.com> wrote:
> Liviu, > My preference would be to default to 8, but make it defined in the header > file for those who want to recompile it. 6 is ok, it’s usually the minimum > precision that is acceptable. > My comment about significant digits was with regards to having extraneous trailing zeros, regardless of how many. Depending on the other value used in a calculation, 0.0019 versus 0.001900 might dictate rounding at a different number of decimal places. This is why I suggested grabbing the number of decimal places from the SQL response. My newbie googling of C printf/scanf indicates you can pass the number of decimal places via the ".precision" format specifier as a value or reference. There's a great answer on the topic here: https://stackoverflow.com/a/19897395 and some followup on C display precision versus mathematical precision and significant digits. It's probably a corner case. This stuff was pounded into me during high school chemistry class :) Regards, *Calvin Ellison* Senior Voice Operations Engineer calvin.elli...@voxox.com >
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users