Re: Need help with rounding on a calculation



Doug Gunnoe wrote on 24 apr 2008 in comp.lang.javascript:

On Apr 23, 2:29 pm, Dr J R Stockton <j...@xxxxxxxxxxxxxxxxxx> wrote:
Those who fail to read the FAQ before posting commonly demonstrate
ineptness.

People with Dr. in front of their name commonly demonstrate their
ability to harp on meaningless trivial bull***, with no consideration
at all for anything practical. If you had actually bothered to read
the OP he was simply wanting to format the output rounded to two
decimals exactly like I showed him. The purpose of his exercise has
nothing to do with some sideline nonsense about properly rounding
currency, but is rather about the OP practicing a little with
javascript. But whatever, if you actually gave a *** you could have
answered his question instead of criticizing my answer.

By the way, I will never, ever, ever, ever, never read the shitty FAQ.
Never. Never, ever, never.


Never.

Evidently you have not considered the difference between rounding to
a multiple 0f 0.01 and rounding to two decimals. Currency outputs
should be rounded to the nearest penny or pound (or foreign
equivalents), not to the nearest florin (unless large, of course).

.01 is a penny.
.10 is a dime
1.00 is a dollar

But thanks anyway for your useless .02

Showing your ineptness in following good advice is one thing,
showing your ignorance of the errors in
rounding a binary fraction for decimal rounded output is worse.

Please read tha faq and repair your manners or be prepared to be ploncked.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
.


Loading