Fixed E3 bugs throughout. Added /Op to build for bug in numerics.cpp code

inherited from SpiderMonkey.


git-svn-id: svn://10.0.0.236/trunk@142342 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rogerl%netscape.com
2003-05-12 21:33:18 +00:00
parent 22c581e6eb
commit 022516fe63
5 changed files with 40 additions and 15 deletions

View File

@@ -134,7 +134,18 @@ static js2val Math_exp(JS2Metadata *meta, const js2val /*thisValue*/, js2val *ar
{
if (argc == 0)
return meta->engine->nanValue;
return meta->engine->allocNumber(fd::exp(meta->toFloat64(argv[0])));
float64 x = meta->toFloat64(argv[0]);
#ifdef _WIN32
if (!JSDOUBLE_IS_NaN(x)) {
if (x == positiveInfinity) {
return meta->engine->posInfValue;
}
if (x == negativeInfinity) {
return JS2VAL_ZERO;
}
}
#endif
return meta->engine->allocNumber(fd::exp(x));
}
static js2val Math_floor(JS2Metadata *meta, const js2val /*thisValue*/, js2val *argv, uint32 argc)
{