Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5a4e18d5220bd74b49700a9f2b1863a762cbc589
Ticket: 3564821fffffffffffffffffffffffffffffffff
math rounding function with arbitrary decimal precision
User & Date: jmcuaz on 2012-09-04 21:22:46
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    When dealing with floating point numbers, there is no easy way in tcl to do something like "round( 2.125 , 2 )" with an expected return of 2.13
    
    For the choice of upward/downward rounding (i.e. toward inf+ or inf-) and to disambiguate the semantic of rounding on negatives fp numbers, maybe two separate functions would be good : something like 
    roundup(x,y)  -> toward inf+
    rounddown(x,y) -> toward inf-
    
    Regards
    
    Jean-Marie Cuaz
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "jmcuaz"
  10. subsystem changed to: "48. Number Handling"
  11. title changed to:
    math rounding function with arbitrary decimal precision
    
  12. type changed to: "RFE"