Talk:Price fraction: Difference between revisions

Content added Content deleted
(1. It is not rounding. 2. It cannot be implemented anyway)
Line 92: Line 92:
:Good point and well made. --[[User:Axtens|Axtens]] 14:25, 21 March 2010 (UTC)
:Good point and well made. --[[User:Axtens|Axtens]] 14:25, 21 March 2010 (UTC)
::<blush>I try.</blush> --[[User:Paddy3118|Paddy3118]] 16:16, 21 March 2010 (UTC)
::<blush>I try.</blush> --[[User:Paddy3118|Paddy3118]] 16:16, 21 March 2010 (UTC)

== Rounding? ==
How conversion [0.0,0.06[->0.1, [0.06,0.11[->0.18 can be named ''rounding''? It is certainly not, because any rounding function must be idempotent, i.e. ''f''(''f''(''x''))=''f''(''x''). The function defined by the table violates this requirement. Consequent "rounding" yields: 0.05->0.1->0.18->0.32 and so on. --[[User:Dmitry-kazakov|Dmitry-kazakov]] 18:22, 6 August 2010 (UTC)

== The task cannot be implemented ==
Another issue with this task is that all provided implementations are broken. The problem is that some of the values from the table simply cannot be represented in the floating-point format based on either 2 or 16 radix. This covers basically all known modern machines. Since these values are non-existent the task cannot be implemented. The moral: don't use floating-point numbers in place of the fixed point ones. --[[User:Dmitry-kazakov|Dmitry-kazakov]] 18:22, 6 August 2010 (UTC)