Difference between revisions of "Rounding"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 2: Line 2:


Values are not rounded in the database. Why not? For example: 0.027 + 0.027 = 0.054. Rounded, this comes to 0.05. But if you are rounding each step, then you get: 0.03 + 0.03 = 0.06. This figure is not so accurate as 0.05.
Values are not rounded in the database. Why not? For example: 0.027 + 0.027 = 0.054. Rounded, this comes to 0.05. But if you are rounding each step, then you get: 0.03 + 0.03 = 0.06. This figure is not so accurate as 0.05.
== Billsec rounding ==
Asterisk calculates '''real billsec''' in miliseconds and rounds up to the nearest value to seconds to get '''billsec'''.
Example:
Real billsec is 41.155338 but billsec is 42 seconds.
Why rounding is UP to the nearest value?
Because '''it is common practice to round UP to the nearest value in favor of our customers.'''
This statement came from long consultations with software developers for various industries, including telecommunications, accounting and banks.
Explanation:
As our clients are system owners who sell traffic/services to their clients, we, as system developers round in favor of our clients, not in favor of clients of our clients.
Conclusion:
We do this, because everybody else do this.

Revision as of 16:29, 13 April 2012

Rounding in MOR GUI is done only when showing the final result.

Values are not rounded in the database. Why not? For example: 0.027 + 0.027 = 0.054. Rounded, this comes to 0.05. But if you are rounding each step, then you get: 0.03 + 0.03 = 0.06. This figure is not so accurate as 0.05.


Billsec rounding

Asterisk calculates real billsec in miliseconds and rounds up to the nearest value to seconds to get billsec.

Example:

Real billsec is 41.155338 but billsec is 42 seconds.

Why rounding is UP to the nearest value?

Because it is common practice to round UP to the nearest value in favor of our customers.

This statement came from long consultations with software developers for various industries, including telecommunications, accounting and banks.

Explanation:

As our clients are system owners who sell traffic/services to their clients, we, as system developers round in favor of our clients, not in favor of clients of our clients.

Conclusion:

We do this, because everybody else do this.