Abandon rounding [Software]

posted by Helmut Homepage – Vienna, Austria, 2013-01-02 18:04 (4559 d 23:24 ago) – Posting: # 9779
Views: 13,281

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,687 registered users;
38 visitors (0 registered, 38 guests [including 8 identified bots]).
Forum time: 18:28 CEST (Europe/Vienna)

Complex, statistically improbable things are by their nature
more difficult to explain than
simple, statistically probable things.    Richard Dawkins

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