rounding

Rounding problem with double type

Possible Duplicate: Why don't operations on double-precision values give expected results? I am experiencing a peculiar problem in C++. I created a variable of type Double. Then I did some calculations with some values assigned to other variables and assigned the result to the double variable I declared. It gave me a result wi...

Rounding to the second decimal spot

how do i round to the second decimal point in C++. thanks for your help. ...

Any way to change rounding method for LSCurrencyFormat in ColdFusion?

ColdFusion's LSCurrencyFormat function appears to be using round-to-half-even (banker's rounding). Is there anyway to change this? I'd like to change it to standard round-half-up rounding that most people are taught in grade school. An example: LSCurrencyFormat(39.7340): $39.73 LSCurrencyFormat(39.7350): $39.74 LSCurrencyFormat(39.7360...

"Rounding" colour values to the nearest of a small set of colours

Preamble As a part of a project I'm working on I am trying to provide a convenient way to search for images in our system. We currently provide searching by various types of user added metadata (e.g. title, description, keywords) and by various metadata which we extract (e.g. EXIF, IPTC, XMP, etc). I would also like to add a "colour s...