Rich <ri...@example.invalid> writes:
>
h.ol...@geon.nl wrote:
>> On Sunday, November 19, 2017 at 12:59:07 PM UTC+1, Cecil Westerhof wrote:
>>> I just started with TCL. I understood that the default value for
>>> tcl_precision should be 12, but on my system it is 0. Which turns
>>> out to do the same as 17, which is also the highest value I can use.
>>>
>>> Is this the way it should be?
>>>
>>> I am using 8.6.6 on Debian 9.2.
>>>
>>> --
>>> Cecil Westerhof
>>> Senior Software Engineer
>>> LinkedIn:
http://www.linkedin.com/in/cecilwesterhof
>>
>> From the man (
https://www.tcl.tk/man/tcl/TclCmd/tclvars.htm):
>>
>> "The default value of 0 is special, meaning that Tcl should convert
>> numbers using as few digits as possible while still distinguishing
>> any floating point number from its nearest neighbours. It differs
>> from using an arbitrarily high value for tcl_precision in that an
>> inexact number like 1.4 will convert as 1.4 rather than
>> 1.3999999999999999 even though the latter is nearer to the exact
>> value of the binary number."
>
> Further from the same man page, and the *most important* quote for this
> topic (the emphasis below is also in the manpage):
>
> *Applications should not change this value;* it is provided for
> compatibility with legacy code.
Aah, then the tutorial I got is not a very good one. It said it was 12
and one of the suggestions was to change it. I will not do it then.