Rounding [Software]

posted by Helmut Homepage – Vienna, Austria, 2013-01-01 17:51 (4567 d 01:29 ago) – Posting: # 9773
Views: 14,713

Hi Simulators!

How does your software round? Mine:
Excel 2000:       round(125.005, 2) → 125.01
OO Calc:          round(125.005, 2) → 125.01
Gnumeric 1.10.16: round(125.005, 2) → 125.01
WinNonlin 5.3:    round(125.005, 2) → 125.01
Phoenix 6.3:      round(125.005, 2) → 125.01
JavaScript:       Math.round(125.005*100)/100 → 125.01
PHP:              round(125.005, 2) → 125.01
PHP ≥5.3.0:       round(125.005, 2, PHP_ROUND_HALF_UP) → 125.01
                  round(125.005, 2, PHP_ROUND_HALF_DOWN) → 125.00
                  round(125.005, 2, PHP_ROUND_HALF_EVEN) → 125.00
                  round(125.005, 2, PHP_ROUND_HALF_ODD) → 125.01
R 2.15.2:         round(125.005, 2) → 125.00

R claims to be compliant with IEC 60559. In normal life not sooo important, but in simulations. Example (106 sim’s, empiric alpha ~ T/R 1.25 in conventional balanced cross-overs).
n   CV   alpha        alpha
         no rounding  CI rounded
42  15%  0.049842     0.050746 (sig. >0.05)
36  17%  0.050010     0.050706 (sig. >0.05)


@ElMaestro: Do you round in C?

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes

Complete thread:

UA Flag
Activity
 Admin contact
23,427 posts in 4,929 threads, 1,678 registered users;
55 visitors (0 registered, 55 guests [including 11 identified bots]).
Forum time: 20:20 CEST (Europe/Vienna)

Half the harm that is done in this world
Is due to people who want to feel important.    T. S. Eliot

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5