Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e8023d1b8bf1d6521326c4a83d51584e89e93955
Ticket: 1340260fffffffffffffffffffffffffffffffff
Simplify round() implementation in expr cmd
User & Date: dgp on 2005-11-01 21:55:14
Changes

  1. icomment:
    Logged In: YES 
    user_id=80530
    
    
    The problem is with systems with
    64-bit longs.  Since IEEE doubles
    have only 53 bits of precision, the
    calculation
    
        (double) LONG_MAX - 1.0
    
    for example, can't be performed.
    That is, the subtraction is lost
    below the precision threshold.
    
    Doing the operations as longs
    doesn't suffer this problem.
    
    
  2. login: "dgp"
  3. mimetype: "text/plain"
  4. username: "dgp"