@@ -22,7 +22,7 @@ class Test #if swf_mark implements mt.Protect #end {
count++;
if (!Math.isFinite(v) || !Math.isFinite(v2))
eq(v, v2, pos);
- else if ( Math.abs(v - v2) > 1e-15 ) {
+ else if ( Math.abs(v - v2) > 1e-10 ) {
report(v+" should be "+v2,pos);
success = false;
}
@@ -77,7 +77,7 @@ class UnitBuilder {
static function mkEq(e1, e2, p) {
function isFloat(e) {
- try return switch(Context.typeof(e)) {
+ try return switch(Context.follow(Context.typeof(e))) {
case TAbstract(tr, _):
tr.get().name == "Float";
case _:
@@ -139,7 +139,7 @@ Math.log(Math.POSITIVE_INFINITY) == Math.POSITIVE_INFINITY;
// exp + log
var floats = [1.33, 12.0, -112.999992, 0.0, Math.NEGATIVE_INFINITY, Math.POSITIVE_INFINITY];
for (f in floats) {
- Math.log(Math.exp(f)) == f;
+ feq(Math.log(Math.exp(f)), f);
// sqrt