[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10536: return NaN from Math.pow if
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10536: return NaN from Math.pow if first arg is not finite: fixes math-function tests from swfdec |
Date: |
Fri, 09 Jan 2009 22:45:28 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10536
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Fri 2009-01-09 22:45:28 +0100
message:
return NaN from Math.pow if first arg is not finite: fixes math-function
tests from swfdec
modified:
libcore/asobj/Math_as.cpp
testsuite/swfdec/PASSING
=== modified file 'libcore/asobj/Math_as.cpp'
--- a/libcore/asobj/Math_as.cpp 2009-01-09 13:50:44 +0000
+++ b/libcore/asobj/Math_as.cpp 2009-01-09 21:45:28 +0000
@@ -155,7 +155,7 @@
}
double arg1 = fn.arg(1).to_number();
- return as_value(std::pow(arg0, arg1));
+ return as_value( utility::isFinite(arg0) ? std::pow(arg0, arg1) : NaN );
}
/// Math.min
=== modified file 'testsuite/swfdec/PASSING'
--- a/testsuite/swfdec/PASSING 2009-01-09 21:33:17 +0000
+++ b/testsuite/swfdec/PASSING 2009-01-09 21:45:28 +0000
@@ -559,6 +559,9 @@
math-constants-5.swf:ca9d0fc66667d7c7863e699367176573
math-constants-6.swf:cc4a6b92d473f57cb5479c97ba77c2e0
math-constants-7.swf:53df046dd67c331c79c0c939215ac770
+math-function-6.swf:1f1af14fb30874dd4a2c5c83ec1273a2
+math-function-7.swf:eb3b07061287c429295046c52ee0ea97
+math-function-8.swf:d364b375ae74bbbfe3dd5e00edb08f49
math-function-valueOf-5.swf:2acbb856f065de5fb649c10e7f2dccc6
math-function-valueOf-6.swf:1ca49a394181b4645a033e90b231e8be
math-function-valueOf-7.swf:f8229fa4a2409b13dfba252d00773a74
- [Gnash-commit] /srv/bzr/gnash/trunk r10536: return NaN from Math.pow if first arg is not finite: fixes math-function tests from swfdec,
Sandro Santilli <=