In article <AANLkTins0-y3VHP-xBZ4u26HKEYkNH7R2-
mxsoazi...@mail.gmail.com>, ljelinek-
ryvdh1uadzjbdgjk7y7...@public.gmane.org says...
> 
> Dobr?? den v??em Javist??m!
> 
> (1)
> Zrovna si Ä?tu
> http://download.oracle.com/javase/tutorial/essential/io/datastreams.html,
> kde mj. p?­??ou
> 
> *(...) Above example uses one very bad programming technique: it uses
> floating point numbers to represent monetary values. In general, floating
> point is bad for precise values. It's particularly bad for decimal
> fractions, because common values (such as 0.1) do not have a binary
> representation.
> 
> The correct type to use for currency values is java.math.BigDecimal.*
> 
> Zcela nech??pu co je na floating point Ä??­slech ??patn?©ho a v Ä?em je 
> lep???­
> BigDecimal. Co se mysl?­ t?­m "precise value"?
> 
> (2)
> V souvislosti s t?­m bych se chtÄ?l zeptat, zda n??sleduj?­c?­ anglick?© 
> term?­ny
> ch??pu spr??vnÄ? (+ jeden si v??bec neum?­m p??elo??it).
> 
> decimal - desetinn?? nebo des?­tkov??
> decimal number - des?­tkov?© Ä??­slo
> decimal integer - des?­tkov?© cel?© Ä??­slo
> floating point number - desetinn?© Ä??­slo
> precision - poÄ?et des. m?­st
> width - ??
> decimal point - desetinn?? teÄ?ka
> decimal places - desetinn?? m?­sta

K mému p?ekvapení se double b?žn? v bankovnictví používá.

H.

Odpovedet emailem