Please create an account to participate in the Slashdot moderation system


Forgot your password?

Comment Re:Lessons (Score 1) 497

If one is careful about rounding at the right time, one can live with Double for smaller amounts.

It's fine for a small amount, e.g. zero.

The next smallest amount 0.01 can not be held exactly in a Double. Nor can 0.1


(or for any figures which need to be stored exactly)

Multiply everything up by the required factors of 10 and store the value as an integer, e.g. a number of cents.

Or write your own decimal class, maybe with an integer to hold the dollars and another for the cents (and another for the tenths or hundredths if you need them).

Comment SQRT(EVAL) (Score 1) 532

Why not just use evil itself?

Evil is in fact money squared.

This is so that money can have both negative and positive values.

I'm not sure whether imaginary evil works - it's bit complex for me.

(Yes I know that it's the love of money that's the root of all evil, but who doesn't love money?)

Slashdot Top Deals

The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group.