Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 261800875bf39e430c7a39b8d4342c06c50af9c7
Ticket: 1003145fffffffffffffffffffffffffffffffff
expr int operation giving different results for same values
User & Date: s_a_white on 2004-08-04 19:42:18
Changes

  1. icomment:
    Logged In: YES 
    user_id=59929
    
    Well as said it wasn't really the actual maths results that
    were the problem, just the fact that you could have two
    different results from the same string/operations.  I hunted
    around a bit more and found TIP 132 (I think it was)
    outlining the problem in more detail.
    
    I can understand the issue now in that internally your
    working at a higher resolution than tcl_precision and that
    the result of puts is based on a rounded version using
    tcl_percision.
    
    I have no idea if all the suggestions recommened in that tip
    would fix things in a way that produces sensible output.  To
    me (if possible) it would be quite acceptable to round
    results at end of maths operations to the required precision
    that was set by tcl_precision.  That way results would be
    consistant with the output of puts and users can still
    increase tcl_precision as required for better results.
    
    
    
  2. login: "s_a_white"
  3. mimetype: "text/plain"
  4. username: "s_a_white"