Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #40143] [TODO] Tcl - support $tcl_precision

4 views
Skip to first unread message

Matt Diephouse

unread,
Aug 9, 2006, 4:36:22 PM8/9/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Matt Diephouse
# Please include the string: [perl #40143]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40143 >


% mini:~/Projects/parrot/languages/tcl mdiep$ tclsh
% set tcl_precision
12
% expr 1/3.0
0.333333333333
% set tcl_precision 17
17
% expr 1/3.0
0.33333333333333331
%

--
Matt Diephouse

Will Coleda

unread,
Aug 9, 2006, 5:25:49 PM8/9/06
to perl6-i...@perl.org, bugs-bi...@netlabs.develooper.com
Note that the default tcl_precision in tclsh8.5 is now '0', not 12.

http://www.tcl.tk/man/tcl8.5/TclCmd/tclvars.htm#M26

Note "Applications should not change this value" !!

Also, from leo:
17:00 <@leo> mdiep: re #40143: you already have TclFloat.get_string,
replace
the line:
17:00 <@leo> buff = Parrot_sprintf_c(INTERP, "%.
16vg",PMC_num_val(SELF));
17:00 <@leo> with ... "%.*vg", prec, PMC_num_val(SELF));
17:01 <@leo> and set 'int prec' from an appropriate namespace, where
tcl_precision is living

--
Will "Coke" Coleda
wi...@coleda.com


0 new messages