Abandon rounding [Software]

posted by Helmut Homepage – Vienna, Austria, 2013-01-02 18:04 (4493 d 19:13 ago) – Posting: # 9779
Views: 12,913

Hi ElMaestro,

❝ Perhaps a little oddly, but in the C standard C will round down for integers


I see. Another hint that C is a child of Fortran (also rounding down).

❝ […] This is done e.g. by comparison with a true double precision figure like 80.00 rather than 80.


Yep. In my future sim’s I will abandon rounding at all. Edit: See above. In my sim’s I used the ratios (not percentages) rounded to 4 decimals.
round(x.xxxxx,4) works – the problem comes with round(xxx.xxx,2).

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,424 posts in 4,927 threads, 1,671 registered users;
53 visitors (0 registered, 53 guests [including 2 identified bots]).
Forum time: 14:17 CEST (Europe/Vienna)

The difference between a surrogate and a true endpoint
is like the difference between a cheque and cash.
You can get the cheque earlier but then,
of course, it might bounce.    Stephen Senn

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