// If either operand is a number, convert both operands to xs:double using
// the rules of the number() function, and compare them
if (t0.isPrimitiveNumeric() || t1.isPrimitiveNumeric()) {
DoubleValue v0 = NumberFn.convert(a0);
DoubleValue v1 = NumberFn.convert(a1);
return ValueComparison.compare(v0, operator, v1, comparer);
}
// If either operand is a string, or if both are untyped atomic, convert
// both operands to strings and compare them