it seams that MaxFloat get MaxDouble (FPC_HAS_TYPE_DOUBLE is defined) but SameValue uses as Single when overload. Works with SameValue(double(a),double(b),double(0)). best regards Tomek