Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: bafee56b8d66c746c9c768af2c1ee35725d359d5
Ticket: 1497990fffffffffffffffffffffffffffffffff
expr sqrt(2) returns 1,41421356237.0 after loading and using
User & Date: ghanke on 2006-05-31 07:28:22
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    TCL-Version: 8.4.13
    OS: Windows 2000 SP4 / Windows XP SP2
    Locale Settings: DE
     - decimal symbol: ,
     - digit grouping symbol .
    
    After loading and using some packages the float
    arithmetic is dead...
    
     puts [expr sqrt(2)]
     # => 1,41421356237.0
    
    In consequence tkcon (and any text widget too) is
    annoying me with errors... 
    
    This occurs rarely. On Win 2000 SP4 with tcom creating
    wmi objects, and with tclodbc when using the ODBC
    driver "Pervasive ODBC Client Interface"
    
    ve SQL affected
    
    fresh compiled TCL 8.4.12 (msys-mingw8) has this bug too. 
    
    The problem disappears using "." for decimal symbol
    (Windows Control Center)
    
    After some investigation I figure out this is not a TCL
    bug but a bug in the sprintf function. This function
    returns sometimes a ',' as decimal point
    
    Perhaps take a hammer and blast them:
    Insert in generic/tclUtil.c (Tcl_PrintDouble) something
    like
          if (*p == ',') {
    *p = '.';
          }
    ...
    
    Greetings
    Goeran
    
    
  4. foundin changed to: "obsolete: 8.4.13"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "ghanke"
  9. subsystem changed to: "48. Number Handling"
  10. title changed to:
    expr sqrt(2) returns 1,41421356237.0 after loading and using
    
  11. type changed to: "Bug"