xsl-list
[Top] [All Lists]

[xsl] Comparing numbers with different precisions

2012-02-09 03:22:50
Hi!

I've a slightly awkward comparison, where I have two numbers of differing 
precisions, and I want to regard them as the same if the less preicse is the 
more precise rounded down to the same precision.

Examples are:
17.166666666666668 ~= 17.1666666666667
and
8.333333333333334 ~= 8.33333333333333

Unfortunately, the precision is not always the same for all the numbers I'm 
trying to compare.

I just wondered if anyone on this list had done anything similar, and had a 
good way of doing it, while I try and figure out a suitable way to do it.

Yours,

Clint Redwood.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--