| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4mathobject.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||||||||||||||
| 5 | using namespace QV4; | - | ||||||||||||||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||||||||||||||
| 7 | const QV4::VTable MathObject::static_vtbl = { (std::is_same<MathObject::SuperClass, Object>::value) ? nullptr : &MathObject::SuperClass::static_vtbl, (sizeof(MathObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(MathObject::Data) + (MathObject::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(MathObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), MathObject::IsExecutionContext, MathObject::IsString, MathObject::IsObject, MathObject::IsFunctionObject, MathObject::IsErrorObject, MathObject::IsArrayData, MathObject::IsStringOrSymbol, MathObject::MyType, { 0, 0, 0, 0 }, "MathObject", MathObject::virtualDestroy, MathObject::Data::markObjects, MathObject::virtualIsEqualTo, MathObject::virtualGet, MathObject::virtualPut, MathObject::virtualDeleteProperty, MathObject::virtualHasProperty, MathObject::virtualGetOwnProperty, MathObject::virtualDefineOwnProperty, MathObject::virtualIsExtensible, MathObject::virtualPreventExtensions, MathObject::virtualGetPrototypeOf, MathObject::virtualSetPrototypeOf, MathObject::virtualGetLength, MathObject::virtualAdvanceIterator, MathObject::virtualInstanceOf, MathObject::virtualCall, MathObject::virtualCallAsConstructor, }; | - | ||||||||||||||||||||||||||||||||||||
| 8 | - | |||||||||||||||||||||||||||||||||||||
| 9 | void Heap::MathObject::init() | - | ||||||||||||||||||||||||||||||||||||
| 10 | { | - | ||||||||||||||||||||||||||||||||||||
| 11 | Object::init(); | - | ||||||||||||||||||||||||||||||||||||
| 12 | Scope scope(internalClass->engine); | - | ||||||||||||||||||||||||||||||||||||
| 13 | ScopedObject m(scope, this); | - | ||||||||||||||||||||||||||||||||||||
| 14 | - | |||||||||||||||||||||||||||||||||||||
| 15 | m->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "E")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "E" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98149 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98149 times by 153 tests: }()), Primitive::fromDouble(return qstring_literal_temp;Executed by:
| 98149 | ||||||||||||||||||||||||||||||||||||
| 16 | 2.7182818284590452354 | - | ||||||||||||||||||||||||||||||||||||
| 17 | )); | - | ||||||||||||||||||||||||||||||||||||
| 18 | m->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "LN2")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "LN2" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98474 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98474 times by 153 tests: }()), Primitive::fromDouble(return qstring_literal_temp;Executed by:
| 98474 | ||||||||||||||||||||||||||||||||||||
| 19 | 0.69314718055994530942 | - | ||||||||||||||||||||||||||||||||||||
| 20 | )); | - | ||||||||||||||||||||||||||||||||||||
| 21 | m->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "LN10")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "LN10" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98680 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98680 times by 153 tests: }()), Primitive::fromDouble(return qstring_literal_temp;Executed by:
| 98680 | ||||||||||||||||||||||||||||||||||||
| 22 | 2.30258509299404568402 | - | ||||||||||||||||||||||||||||||||||||
| 23 | )); | - | ||||||||||||||||||||||||||||||||||||
| 24 | m->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "LOG2E")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "LOG2E" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98732 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98732 times by 153 tests: }()), Primitive::fromDouble(return qstring_literal_temp;Executed by:
| 98732 | ||||||||||||||||||||||||||||||||||||
| 25 | 1.4426950408889634074 | - | ||||||||||||||||||||||||||||||||||||
| 26 | )); | - | ||||||||||||||||||||||||||||||||||||
| 27 | m->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "LOG10E")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "LOG10E" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98637 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98637 times by 153 tests: }()), Primitive::fromDouble(return qstring_literal_temp;Executed by:
| 98637 | ||||||||||||||||||||||||||||||||||||
| 28 | 0.43429448190325182765 | - | ||||||||||||||||||||||||||||||||||||
| 29 | )); | - | ||||||||||||||||||||||||||||||||||||
| 30 | m->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "PI")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "PI" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98850 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98850 times by 153 tests: }()), Primitive::fromDouble(return qstring_literal_temp;Executed by:
| 98850 | ||||||||||||||||||||||||||||||||||||
| 31 | 3.14159265358979323846 | - | ||||||||||||||||||||||||||||||||||||
| 32 | )); | - | ||||||||||||||||||||||||||||||||||||
| 33 | m->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "SQRT1_2")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "SQRT1_2" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98491 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98491 times by 153 tests: }()), Primitive::fromDouble(return qstring_literal_temp;Executed by:
| 98491 | ||||||||||||||||||||||||||||||||||||
| 34 | 0.70710678118654752440 | - | ||||||||||||||||||||||||||||||||||||
| 35 | )); | - | ||||||||||||||||||||||||||||||||||||
| 36 | m->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "SQRT2")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "SQRT2" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98453 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98453 times by 153 tests: }()), Primitive::fromDouble(return qstring_literal_temp;Executed by:
| 98453 | ||||||||||||||||||||||||||||||||||||
| 37 | 1.41421356237309504880 | - | ||||||||||||||||||||||||||||||||||||
| 38 | )); | - | ||||||||||||||||||||||||||||||||||||
| 39 | - | |||||||||||||||||||||||||||||||||||||
| 40 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "abs")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "abs" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98501 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98501 times by 153 tests: }()), QV4::MathObject::method_abs, 1);return qstring_literal_temp;Executed by:
| 98501 | ||||||||||||||||||||||||||||||||||||
| 41 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "acos")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "acos" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98595 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98595 times by 153 tests: }()), QV4::MathObject::method_acos, 1);return qstring_literal_temp;Executed by:
| 98595 | ||||||||||||||||||||||||||||||||||||
| 42 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "acosh")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "acosh" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98691 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98691 times by 153 tests: }()), QV4::MathObject::method_acosh, 1);return qstring_literal_temp;Executed by:
| 98691 | ||||||||||||||||||||||||||||||||||||
| 43 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "asin")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "asin" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98532 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98532 times by 153 tests: }()), QV4::MathObject::method_asin, 1);return qstring_literal_temp;Executed by:
| 98532 | ||||||||||||||||||||||||||||||||||||
| 44 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "asinh")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "asinh" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98458 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98458 times by 153 tests: }()), QV4::MathObject::method_asinh, 1);return qstring_literal_temp;Executed by:
| 98458 | ||||||||||||||||||||||||||||||||||||
| 45 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "atan")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "atan" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98658 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98658 times by 153 tests: }()), QV4::MathObject::method_atan, 1);return qstring_literal_temp;Executed by:
| 98658 | ||||||||||||||||||||||||||||||||||||
| 46 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "atanh")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "atanh" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98659 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98659 times by 153 tests: }()), QV4::MathObject::method_atanh, 1);return qstring_literal_temp;Executed by:
| 98659 | ||||||||||||||||||||||||||||||||||||
| 47 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "atan2")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "atan2" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98669 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98669 times by 153 tests: }()), QV4::MathObject::method_atan2, 2);return qstring_literal_temp;Executed by:
| 98669 | ||||||||||||||||||||||||||||||||||||
| 48 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "cbrt")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "cbrt" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98658 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98658 times by 153 tests: }()), QV4::MathObject::method_cbrt, 1);return qstring_literal_temp;Executed by:
| 98658 | ||||||||||||||||||||||||||||||||||||
| 49 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "ceil")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ceil" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98548 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98548 times by 153 tests: }()), QV4::MathObject::method_ceil, 1);return qstring_literal_temp;Executed by:
| 98548 | ||||||||||||||||||||||||||||||||||||
| 50 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "clz32")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "clz32" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98770 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98770 times by 153 tests: }()), QV4::MathObject::method_clz32, 1);return qstring_literal_temp;Executed by:
| 98770 | ||||||||||||||||||||||||||||||||||||
| 51 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "cos")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "cos" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 99124 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 99124 times by 153 tests: }()), QV4::MathObject::method_cos, 1);return qstring_literal_temp;Executed by:
| 99124 | ||||||||||||||||||||||||||||||||||||
| 52 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "cosh")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "cosh" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98448 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98448 times by 153 tests: }()), QV4::MathObject::method_cosh, 1);return qstring_literal_temp;Executed by:
| 98448 | ||||||||||||||||||||||||||||||||||||
| 53 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "exp")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "exp" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98579 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98579 times by 153 tests: }()), QV4::MathObject::method_exp, 1);return qstring_literal_temp;Executed by:
| 98579 | ||||||||||||||||||||||||||||||||||||
| 54 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "expm1")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "expm1" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98550 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98550 times by 153 tests: }()), QV4::MathObject::method_expm1, 1);return qstring_literal_temp;Executed by:
| 98550 | ||||||||||||||||||||||||||||||||||||
| 55 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "floor")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "floor" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98589 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98589 times by 153 tests: }()), QV4::MathObject::method_floor, 1);return qstring_literal_temp;Executed by:
| 98589 | ||||||||||||||||||||||||||||||||||||
| 56 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "fround")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fround" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98522 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98522 times by 153 tests: }()), QV4::MathObject::method_fround, 1);return qstring_literal_temp;Executed by:
| 98522 | ||||||||||||||||||||||||||||||||||||
| 57 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "hypot")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "hypot" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98725 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98725 times by 153 tests: }()), QV4::MathObject::method_hypot, 2);return qstring_literal_temp;Executed by:
| 98725 | ||||||||||||||||||||||||||||||||||||
| 58 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "imul")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "imul" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98735 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98735 times by 153 tests: }()), QV4::MathObject::method_imul, 2);return qstring_literal_temp;Executed by:
| 98735 | ||||||||||||||||||||||||||||||||||||
| 59 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "log")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "log" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 99012 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 99012 times by 153 tests: }()), QV4::MathObject::method_log, 1);return qstring_literal_temp;Executed by:
| 99012 | ||||||||||||||||||||||||||||||||||||
| 60 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "log10")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "log10" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98562 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98562 times by 153 tests: }()), QV4::MathObject::method_log10, 1);return qstring_literal_temp;Executed by:
| 98562 | ||||||||||||||||||||||||||||||||||||
| 61 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "log1p")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "log1p" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98689 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98689 times by 153 tests: }()), QV4::MathObject::method_log1p, 1);return qstring_literal_temp;Executed by:
| 98689 | ||||||||||||||||||||||||||||||||||||
| 62 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "log2")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "log2" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98732 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98732 times by 153 tests: }()), QV4::MathObject::method_log2, 1);return qstring_literal_temp;Executed by:
| 98732 | ||||||||||||||||||||||||||||||||||||
| 63 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "max")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "max" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98522 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98522 times by 153 tests: }()), QV4::MathObject::method_max, 2);return qstring_literal_temp;Executed by:
| 98522 | ||||||||||||||||||||||||||||||||||||
| 64 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "min")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "min" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 99033 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 99033 times by 153 tests: }()), QV4::MathObject::method_min, 2);return qstring_literal_temp;Executed by:
| 99033 | ||||||||||||||||||||||||||||||||||||
| 65 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "pow")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "pow" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98700 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98700 times by 153 tests: }()), QV4::MathObject::method_pow, 2);return qstring_literal_temp;Executed by:
| 98700 | ||||||||||||||||||||||||||||||||||||
| 66 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "random")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "random" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98598 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98598 times by 153 tests: }()), QV4::MathObject::method_random, 0);return qstring_literal_temp;Executed by:
| 98598 | ||||||||||||||||||||||||||||||||||||
| 67 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "round")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "round" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98720 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98720 times by 153 tests: }()), QV4::MathObject::method_round, 1);return qstring_literal_temp;Executed by:
| 98720 | ||||||||||||||||||||||||||||||||||||
| 68 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "sign")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "sign" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98170 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98170 times by 153 tests: }()), QV4::MathObject::method_sign, 1);return qstring_literal_temp;Executed by:
| 98170 | ||||||||||||||||||||||||||||||||||||
| 69 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "sin")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "sin" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 99100 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 99100 times by 153 tests: }()), QV4::MathObject::method_sin, 1);return qstring_literal_temp;Executed by:
| 99100 | ||||||||||||||||||||||||||||||||||||
| 70 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "sinh")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "sinh" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98951 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98951 times by 153 tests: }()), QV4::MathObject::method_sinh, 1);return qstring_literal_temp;Executed by:
| 98951 | ||||||||||||||||||||||||||||||||||||
| 71 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "sqrt")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "sqrt" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98806 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98806 times by 153 tests: }()), QV4::MathObject::method_sqrt, 1);return qstring_literal_temp;Executed by:
| 98806 | ||||||||||||||||||||||||||||||||||||
| 72 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "tan")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "tan" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98808 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98808 times by 153 tests: }()), QV4::MathObject::method_tan, 1);return qstring_literal_temp;Executed by:
| 98808 | ||||||||||||||||||||||||||||||||||||
| 73 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "tanh")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "tanh" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98858 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98858 times by 153 tests: }()), QV4::MathObject::method_tanh, 1);return qstring_literal_temp;Executed by:
| 98858 | ||||||||||||||||||||||||||||||||||||
| 74 | m->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "trunc")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "trunc" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98857 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98857 times by 153 tests: }()), QV4::MathObject::method_trunc, 1);return qstring_literal_temp;Executed by:
| 98857 | ||||||||||||||||||||||||||||||||||||
| 75 | - | |||||||||||||||||||||||||||||||||||||
| 76 | ScopedString name(scope, scope.engine->newString(([]() noexcept -> QString { enum { Size = sizeof(u"" "Math")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Math" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98971 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98971 times by 153 tests: }())));return qstring_literal_temp;Executed by:
| 98971 | ||||||||||||||||||||||||||||||||||||
| 77 | m->defineReadonlyConfigurableProperty(scope.engine->symbol_toStringTag(), name); | - | ||||||||||||||||||||||||||||||||||||
| 78 | } executed 99041 times by 153 tests: end of blockExecuted by:
| 99041 | ||||||||||||||||||||||||||||||||||||
| 79 | - | |||||||||||||||||||||||||||||||||||||
| 80 | static inline __attribute__((always_inline)) double copySign(double x, double y) | - | ||||||||||||||||||||||||||||||||||||
| 81 | { | - | ||||||||||||||||||||||||||||||||||||
| 82 | return executed 8824 times by 3 tests: ::copysign(x, y);return ::copysign(x, y);Executed by:
executed 8824 times by 3 tests: return ::copysign(x, y);Executed by:
| 8824 | ||||||||||||||||||||||||||||||||||||
| 83 | } | - | ||||||||||||||||||||||||||||||||||||
| 84 | - | |||||||||||||||||||||||||||||||||||||
| 85 | ReturnedValue MathObject::method_abs(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 86 | { | - | ||||||||||||||||||||||||||||||||||||
| 87 | if (!argc
| 0-146 | ||||||||||||||||||||||||||||||||||||
| 88 | return never executed: QV4::Encode(Encode(qt_qnan()));return QV4::Encode(Encode(qt_qnan()));never executed: return QV4::Encode(Encode(qt_qnan())); | 0 | ||||||||||||||||||||||||||||||||||||
| 89 | - | |||||||||||||||||||||||||||||||||||||
| 90 | if (argv[0].isInteger()
| 24-122 | ||||||||||||||||||||||||||||||||||||
| 91 | int i = argv[0].integerValue(); | - | ||||||||||||||||||||||||||||||||||||
| 92 | return executed 24 times by 2 tests: QV4::Encode(Encode(i < 0 ? - i : i));return QV4::Encode(Encode(i < 0 ? - i : i));Executed by:
executed 24 times by 2 tests: return QV4::Encode(Encode(i < 0 ? - i : i));Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
| 93 | } | - | ||||||||||||||||||||||||||||||||||||
| 94 | - | |||||||||||||||||||||||||||||||||||||
| 95 | double v = argv[0].toNumber(); | - | ||||||||||||||||||||||||||||||||||||
| 96 | if (v == 0
| 20-102 | ||||||||||||||||||||||||||||||||||||
| 97 | return executed 20 times by 2 tests: QV4::Encode(Encode(0));return QV4::Encode(Encode(0));Executed by:
executed 20 times by 2 tests: return QV4::Encode(Encode(0));Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
| 98 | - | |||||||||||||||||||||||||||||||||||||
| 99 | return executed 102 times by 4 tests: QV4::Encode(Encode(v < 0 ? -v : v));return QV4::Encode(Encode(v < 0 ? -v : v));Executed by:
executed 102 times by 4 tests: return QV4::Encode(Encode(v < 0 ? -v : v));Executed by:
| 102 | ||||||||||||||||||||||||||||||||||||
| 100 | } | - | ||||||||||||||||||||||||||||||||||||
| 101 | - | |||||||||||||||||||||||||||||||||||||
| 102 | ReturnedValue MathObject::method_acos(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 103 | { | - | ||||||||||||||||||||||||||||||||||||
| 104 | double v = argc
| 0-31 | ||||||||||||||||||||||||||||||||||||
| 105 | if (v > 1
| 12-20 | ||||||||||||||||||||||||||||||||||||
| 106 | return executed 12 times by 1 test: QV4::Encode(Encode(qt_qnan()));return QV4::Encode(Encode(qt_qnan()));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(qt_qnan()));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 107 | - | |||||||||||||||||||||||||||||||||||||
| 108 | return executed 20 times by 1 test: QV4::Encode(Encode(std::acos(v)));return QV4::Encode(Encode(std::acos(v)));Executed by:
executed 20 times by 1 test: return QV4::Encode(Encode(std::acos(v)));Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
| 109 | } | - | ||||||||||||||||||||||||||||||||||||
| 110 | - | |||||||||||||||||||||||||||||||||||||
| 111 | ReturnedValue MathObject::method_acosh(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 112 | { | - | ||||||||||||||||||||||||||||||||||||
| 113 | double v = argc
| 0-28 | ||||||||||||||||||||||||||||||||||||
| 114 | if (v < 1
| 12-16 | ||||||||||||||||||||||||||||||||||||
| 115 | return executed 16 times by 1 test: QV4::Encode(Encode(qt_qnan()));return QV4::Encode(Encode(qt_qnan()));Executed by:
executed 16 times by 1 test: return QV4::Encode(Encode(qt_qnan()));Executed by:
| 16 | ||||||||||||||||||||||||||||||||||||
| 116 | - | |||||||||||||||||||||||||||||||||||||
| 117 | - | |||||||||||||||||||||||||||||||||||||
| 118 | - | |||||||||||||||||||||||||||||||||||||
| 119 | - | |||||||||||||||||||||||||||||||||||||
| 120 | return executed 12 times by 1 test: QV4::Encode(Encode(std::acosh(v)));return QV4::Encode(Encode(std::acosh(v)));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(std::acosh(v)));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 121 | - | |||||||||||||||||||||||||||||||||||||
| 122 | } | - | ||||||||||||||||||||||||||||||||||||
| 123 | - | |||||||||||||||||||||||||||||||||||||
| 124 | ReturnedValue MathObject::method_asin(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 125 | { | - | ||||||||||||||||||||||||||||||||||||
| 126 | double v = argc
| 0-36 | ||||||||||||||||||||||||||||||||||||
| 127 | if (v > 1
| 12-24 | ||||||||||||||||||||||||||||||||||||
| 128 | return executed 12 times by 1 test: QV4::Encode(Encode(qt_qnan()));return QV4::Encode(Encode(qt_qnan()));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(qt_qnan()));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 129 | else | - | ||||||||||||||||||||||||||||||||||||
| 130 | return executed 24 times by 1 test: QV4::Encode(Encode(std::asin(v)));return QV4::Encode(Encode(std::asin(v)));Executed by:
executed 24 times by 1 test: return QV4::Encode(Encode(std::asin(v)));Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
| 131 | } | - | ||||||||||||||||||||||||||||||||||||
| 132 | - | |||||||||||||||||||||||||||||||||||||
| 133 | ReturnedValue MathObject::method_asinh(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 134 | { | - | ||||||||||||||||||||||||||||||||||||
| 135 | double v = argc
| 0-20 | ||||||||||||||||||||||||||||||||||||
| 136 | if (v == 0.0
| 8-12 | ||||||||||||||||||||||||||||||||||||
| 137 | return executed 8 times by 1 test: QV4::Encode(Encode(v));return QV4::Encode(Encode(v));Executed by:
executed 8 times by 1 test: return QV4::Encode(Encode(v));Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 138 | - | |||||||||||||||||||||||||||||||||||||
| 139 | - | |||||||||||||||||||||||||||||||||||||
| 140 | - | |||||||||||||||||||||||||||||||||||||
| 141 | - | |||||||||||||||||||||||||||||||||||||
| 142 | return executed 12 times by 1 test: QV4::Encode(Encode(std::asinh(v)));return QV4::Encode(Encode(std::asinh(v)));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(std::asinh(v)));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 143 | - | |||||||||||||||||||||||||||||||||||||
| 144 | } | - | ||||||||||||||||||||||||||||||||||||
| 145 | - | |||||||||||||||||||||||||||||||||||||
| 146 | ReturnedValue MathObject::method_atan(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 147 | { | - | ||||||||||||||||||||||||||||||||||||
| 148 | double v = argc
| 0-12 | ||||||||||||||||||||||||||||||||||||
| 149 | if (v == 0.0
| 4-8 | ||||||||||||||||||||||||||||||||||||
| 150 | return executed 8 times by 1 test: QV4::Encode(Encode(v));return QV4::Encode(Encode(v));Executed by:
executed 8 times by 1 test: return QV4::Encode(Encode(v));Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 151 | else | - | ||||||||||||||||||||||||||||||||||||
| 152 | return executed 4 times by 1 test: QV4::Encode(Encode(std::atan(v)));return QV4::Encode(Encode(std::atan(v)));Executed by:
executed 4 times by 1 test: return QV4::Encode(Encode(std::atan(v)));Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 153 | } | - | ||||||||||||||||||||||||||||||||||||
| 154 | - | |||||||||||||||||||||||||||||||||||||
| 155 | ReturnedValue MathObject::method_atanh(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 156 | { | - | ||||||||||||||||||||||||||||||||||||
| 157 | double v = argc
| 0-44 | ||||||||||||||||||||||||||||||||||||
| 158 | if (v == 0.0
| 8-36 | ||||||||||||||||||||||||||||||||||||
| 159 | return executed 8 times by 1 test: QV4::Encode(Encode(v));return QV4::Encode(Encode(v));Executed by:
executed 8 times by 1 test: return QV4::Encode(Encode(v));Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 160 | return executed 36 times by 1 test: QV4::Encode(Encode(std::atanh(v)));return QV4::Encode(Encode(std::atanh(v)));Executed by:
executed 36 times by 1 test: return QV4::Encode(Encode(std::atanh(v)));Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||
| 161 | - | |||||||||||||||||||||||||||||||||||||
| 162 | } | - | ||||||||||||||||||||||||||||||||||||
| 163 | - | |||||||||||||||||||||||||||||||||||||
| 164 | ReturnedValue MathObject::method_atan2(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 165 | { | - | ||||||||||||||||||||||||||||||||||||
| 166 | double v1 = argc
| 0-112 | ||||||||||||||||||||||||||||||||||||
| 167 | double v2 = argc > 1
| 0-112 | ||||||||||||||||||||||||||||||||||||
| 168 | - | |||||||||||||||||||||||||||||||||||||
| 169 | if ((
| 0-92 | ||||||||||||||||||||||||||||||||||||
| 170 | return executed 12 times by 1 test: QV4::Encode(Encode(copySign(0, -1.0)));return QV4::Encode(Encode(copySign(0, -1.0)));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(copySign(0, -1.0)));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 171 | - | |||||||||||||||||||||||||||||||||||||
| 172 | if ((
| 8-60 | ||||||||||||||||||||||||||||||||||||
| 173 | if ((
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 174 | return never executed: QV4::Encode(Encode(return QV4::Encode(Encode( 3.14159265358979323846 ));never executed: return QV4::Encode(Encode( 3.14159265358979323846 )); | 0 | ||||||||||||||||||||||||||||||||||||
| 175 | 3.14159265358979323846 never executed: return QV4::Encode(Encode( 3.14159265358979323846 )); | 0 | ||||||||||||||||||||||||||||||||||||
| 176 | )); never executed: return QV4::Encode(Encode( 3.14159265358979323846 )); | 0 | ||||||||||||||||||||||||||||||||||||
| 177 | } else if ((
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 178 | return never executed: QV4::Encode(Encode(-return QV4::Encode(Encode(- 3.14159265358979323846 ));never executed: return QV4::Encode(Encode(- 3.14159265358979323846 )); | 0 | ||||||||||||||||||||||||||||||||||||
| 179 | 3.14159265358979323846 never executed: return QV4::Encode(Encode(- 3.14159265358979323846 )); | 0 | ||||||||||||||||||||||||||||||||||||
| 180 | )); never executed: return QV4::Encode(Encode(- 3.14159265358979323846 )); | 0 | ||||||||||||||||||||||||||||||||||||
| 181 | } | - | ||||||||||||||||||||||||||||||||||||
| 182 | } executed 8 times by 1 test: end of blockExecuted by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 183 | return executed 100 times by 1 test: QV4::Encode(Encode(std::atan2(v1, v2)));return QV4::Encode(Encode(std::atan2(v1, v2)));Executed by:
executed 100 times by 1 test: return QV4::Encode(Encode(std::atan2(v1, v2)));Executed by:
| 100 | ||||||||||||||||||||||||||||||||||||
| 184 | } | - | ||||||||||||||||||||||||||||||||||||
| 185 | - | |||||||||||||||||||||||||||||||||||||
| 186 | ReturnedValue MathObject::method_cbrt(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 187 | { | - | ||||||||||||||||||||||||||||||||||||
| 188 | double v = argc
| 0-20 | ||||||||||||||||||||||||||||||||||||
| 189 | - | |||||||||||||||||||||||||||||||||||||
| 190 | - | |||||||||||||||||||||||||||||||||||||
| 191 | - | |||||||||||||||||||||||||||||||||||||
| 192 | return executed 20 times by 1 test: QV4::Encode(Encode(std::cbrt(v)));return QV4::Encode(Encode(std::cbrt(v)));Executed by:
executed 20 times by 1 test: return QV4::Encode(Encode(std::cbrt(v)));Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
| 193 | - | |||||||||||||||||||||||||||||||||||||
| 194 | } | - | ||||||||||||||||||||||||||||||||||||
| 195 | - | |||||||||||||||||||||||||||||||||||||
| 196 | ReturnedValue MathObject::method_ceil(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 197 | { | - | ||||||||||||||||||||||||||||||||||||
| 198 | double v = argc
| 0-16058 | ||||||||||||||||||||||||||||||||||||
| 199 | if (v < 0.0
| 84-8036 | ||||||||||||||||||||||||||||||||||||
| 200 | return executed 84 times by 1 test: QV4::Encode(Encode(copySign(0, -1.0)));return QV4::Encode(Encode(copySign(0, -1.0)));Executed by:
executed 84 times by 1 test: return QV4::Encode(Encode(copySign(0, -1.0)));Executed by:
| 84 | ||||||||||||||||||||||||||||||||||||
| 201 | else | - | ||||||||||||||||||||||||||||||||||||
| 202 | return executed 15974 times by 2 tests: QV4::Encode(Encode(std::ceil(v)));return QV4::Encode(Encode(std::ceil(v)));Executed by:
executed 15974 times by 2 tests: return QV4::Encode(Encode(std::ceil(v)));Executed by:
| 15974 | ||||||||||||||||||||||||||||||||||||
| 203 | } | - | ||||||||||||||||||||||||||||||||||||
| 204 | - | |||||||||||||||||||||||||||||||||||||
| 205 | ReturnedValue MathObject::method_clz32(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 206 | { | - | ||||||||||||||||||||||||||||||||||||
| 207 | quint32 v = argc
| 0-100 | ||||||||||||||||||||||||||||||||||||
| 208 | return executed 100 times by 1 test: QV4::Encode(Encode(qint32(qCountLeadingZeroBits(v))));return QV4::Encode(Encode(qint32(qCountLeadingZeroBits(v))));Executed by:
executed 100 times by 1 test: return QV4::Encode(Encode(qint32(qCountLeadingZeroBits(v))));Executed by:
| 100 | ||||||||||||||||||||||||||||||||||||
| 209 | } | - | ||||||||||||||||||||||||||||||||||||
| 210 | - | |||||||||||||||||||||||||||||||||||||
| 211 | ReturnedValue MathObject::method_cos(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 212 | { | - | ||||||||||||||||||||||||||||||||||||
| 213 | double v = argc
| 0-450 | ||||||||||||||||||||||||||||||||||||
| 214 | return executed 450 times by 2 tests: QV4::Encode(Encode(std::cos(v)));return QV4::Encode(Encode(std::cos(v)));Executed by:
executed 450 times by 2 tests: return QV4::Encode(Encode(std::cos(v)));Executed by:
| 450 | ||||||||||||||||||||||||||||||||||||
| 215 | } | - | ||||||||||||||||||||||||||||||||||||
| 216 | - | |||||||||||||||||||||||||||||||||||||
| 217 | ReturnedValue MathObject::method_cosh(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 218 | { | - | ||||||||||||||||||||||||||||||||||||
| 219 | double v = argc
| 0-20 | ||||||||||||||||||||||||||||||||||||
| 220 | return executed 20 times by 1 test: QV4::Encode(Encode(std::cosh(v)));return QV4::Encode(Encode(std::cosh(v)));Executed by:
executed 20 times by 1 test: return QV4::Encode(Encode(std::cosh(v)));Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
| 221 | } | - | ||||||||||||||||||||||||||||||||||||
| 222 | - | |||||||||||||||||||||||||||||||||||||
| 223 | ReturnedValue MathObject::method_exp(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 224 | { | - | ||||||||||||||||||||||||||||||||||||
| 225 | double v = argc
| 0-20 | ||||||||||||||||||||||||||||||||||||
| 226 | if (qt_is_inf(v)
| 8-12 | ||||||||||||||||||||||||||||||||||||
| 227 | if (copySign(1.0, v) == -1.0
| 4 | ||||||||||||||||||||||||||||||||||||
| 228 | return executed 4 times by 1 test: QV4::Encode(Encode(0));return QV4::Encode(Encode(0));Executed by:
executed 4 times by 1 test: return QV4::Encode(Encode(0));Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 229 | else | - | ||||||||||||||||||||||||||||||||||||
| 230 | return executed 4 times by 1 test: QV4::Encode(Encode(qt_inf()));return QV4::Encode(Encode(qt_inf()));Executed by:
executed 4 times by 1 test: return QV4::Encode(Encode(qt_inf()));Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 231 | } else { | - | ||||||||||||||||||||||||||||||||||||
| 232 | return executed 12 times by 1 test: QV4::Encode(Encode(std::exp(v)));return QV4::Encode(Encode(std::exp(v)));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(std::exp(v)));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 233 | } | - | ||||||||||||||||||||||||||||||||||||
| 234 | } | - | ||||||||||||||||||||||||||||||||||||
| 235 | - | |||||||||||||||||||||||||||||||||||||
| 236 | ReturnedValue MathObject::method_expm1(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 237 | { | - | ||||||||||||||||||||||||||||||||||||
| 238 | double v = argc
| 0-20 | ||||||||||||||||||||||||||||||||||||
| 239 | if (std::isnan(v)
| 4-16 | ||||||||||||||||||||||||||||||||||||
| 240 | return executed 12 times by 1 test: QV4::Encode(Encode(v));return QV4::Encode(Encode(v));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(v));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 241 | } else if (qt_is_inf(v)
| 0-8 | ||||||||||||||||||||||||||||||||||||
| 242 | if (copySign(1.0, v) == -1.0
| 4 | ||||||||||||||||||||||||||||||||||||
| 243 | return executed 4 times by 1 test: QV4::Encode(Encode(-1.0));return QV4::Encode(Encode(-1.0));Executed by:
executed 4 times by 1 test: return QV4::Encode(Encode(-1.0));Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 244 | else | - | ||||||||||||||||||||||||||||||||||||
| 245 | return executed 4 times by 1 test: QV4::Encode(Encode(qt_inf()));return QV4::Encode(Encode(qt_inf()));Executed by:
executed 4 times by 1 test: return QV4::Encode(Encode(qt_inf()));Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 246 | } else { | - | ||||||||||||||||||||||||||||||||||||
| 247 | - | |||||||||||||||||||||||||||||||||||||
| 248 | - | |||||||||||||||||||||||||||||||||||||
| 249 | - | |||||||||||||||||||||||||||||||||||||
| 250 | return never executed: QV4::Encode(Encode(std::expm1(v)));return QV4::Encode(Encode(std::expm1(v)));never executed: return QV4::Encode(Encode(std::expm1(v))); | 0 | ||||||||||||||||||||||||||||||||||||
| 251 | - | |||||||||||||||||||||||||||||||||||||
| 252 | } | - | ||||||||||||||||||||||||||||||||||||
| 253 | } | - | ||||||||||||||||||||||||||||||||||||
| 254 | - | |||||||||||||||||||||||||||||||||||||
| 255 | ReturnedValue MathObject::method_floor(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 256 | { | - | ||||||||||||||||||||||||||||||||||||
| 257 | double v = argc
| 0-1007279 | ||||||||||||||||||||||||||||||||||||
| 258 | Value result = Primitive::fromDouble(std::floor(v)); | - | ||||||||||||||||||||||||||||||||||||
| 259 | result.isInt32(); | - | ||||||||||||||||||||||||||||||||||||
| 260 | return executed 1007278 times by 4 tests: QV4::Encode(result);return QV4::Encode(result);Executed by:
executed 1007278 times by 4 tests: return QV4::Encode(result);Executed by:
| 1007278 | ||||||||||||||||||||||||||||||||||||
| 261 | } | - | ||||||||||||||||||||||||||||||||||||
| 262 | - | |||||||||||||||||||||||||||||||||||||
| 263 | ReturnedValue MathObject::method_fround(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 264 | { | - | ||||||||||||||||||||||||||||||||||||
| 265 | double v = argc
| 0-40 | ||||||||||||||||||||||||||||||||||||
| 266 | if (std::isnan(v)
| 4-36 | ||||||||||||||||||||||||||||||||||||
| 267 | return executed 16 times by 1 test: QV4::Encode(Encode(v));return QV4::Encode(Encode(v));Executed by:
executed 16 times by 1 test: return QV4::Encode(Encode(v));Executed by:
| 16 | ||||||||||||||||||||||||||||||||||||
| 268 | else | - | ||||||||||||||||||||||||||||||||||||
| 269 | return executed 24 times by 1 test: QV4::Encode(Encode(double(float(v))));return QV4::Encode(Encode(double(float(v))));Executed by:
executed 24 times by 1 test: return QV4::Encode(Encode(double(float(v))));Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
| 270 | } | - | ||||||||||||||||||||||||||||||||||||
| 271 | - | |||||||||||||||||||||||||||||||||||||
| 272 | ReturnedValue MathObject::method_hypot(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 273 | { | - | ||||||||||||||||||||||||||||||||||||
| 274 | - | |||||||||||||||||||||||||||||||||||||
| 275 | - | |||||||||||||||||||||||||||||||||||||
| 276 | double v = argc
| 4-36 | ||||||||||||||||||||||||||||||||||||
| 277 | for (int i = 1; i < argc
| 36-40 | ||||||||||||||||||||||||||||||||||||
| 278 | v = std::hypot(v, argv[i].toNumber()); executed 36 times by 1 test: v = std::hypot(v, argv[i].toNumber());Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||
| 279 | - | |||||||||||||||||||||||||||||||||||||
| 280 | return executed 40 times by 1 test: QV4::Encode(Primitive::fromDouble(v));return QV4::Encode(Primitive::fromDouble(v));Executed by:
executed 40 times by 1 test: return QV4::Encode(Primitive::fromDouble(v));Executed by:
| 40 | ||||||||||||||||||||||||||||||||||||
| 281 | } | - | ||||||||||||||||||||||||||||||||||||
| 282 | - | |||||||||||||||||||||||||||||||||||||
| 283 | ReturnedValue MathObject::method_imul(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 284 | { | - | ||||||||||||||||||||||||||||||||||||
| 285 | quint32 a = argc
| 0-136 | ||||||||||||||||||||||||||||||||||||
| 286 | quint32 b = argc > 0
| 0-136 | ||||||||||||||||||||||||||||||||||||
| 287 | qint32 product = a * b; | - | ||||||||||||||||||||||||||||||||||||
| 288 | return executed 136 times by 1 test: QV4::Encode(Encode(product));return QV4::Encode(Encode(product));Executed by:
executed 136 times by 1 test: return QV4::Encode(Encode(product));Executed by:
| 136 | ||||||||||||||||||||||||||||||||||||
| 289 | } | - | ||||||||||||||||||||||||||||||||||||
| 290 | - | |||||||||||||||||||||||||||||||||||||
| 291 | ReturnedValue MathObject::method_log(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 292 | { | - | ||||||||||||||||||||||||||||||||||||
| 293 | double v = argc
| 0-32 | ||||||||||||||||||||||||||||||||||||
| 294 | if (v < 0
| 12-20 | ||||||||||||||||||||||||||||||||||||
| 295 | return executed 12 times by 1 test: QV4::Encode(Encode(qt_qnan()));return QV4::Encode(Encode(qt_qnan()));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(qt_qnan()));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 296 | else | - | ||||||||||||||||||||||||||||||||||||
| 297 | return executed 20 times by 1 test: QV4::Encode(Encode(std::log(v)));return QV4::Encode(Encode(std::log(v)));Executed by:
executed 20 times by 1 test: return QV4::Encode(Encode(std::log(v)));Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
| 298 | } | - | ||||||||||||||||||||||||||||||||||||
| 299 | - | |||||||||||||||||||||||||||||||||||||
| 300 | ReturnedValue MathObject::method_log10(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 301 | { | - | ||||||||||||||||||||||||||||||||||||
| 302 | double v = argc
| 0-48 | ||||||||||||||||||||||||||||||||||||
| 303 | if (v < 0
| 8-40 | ||||||||||||||||||||||||||||||||||||
| 304 | return executed 8 times by 1 test: QV4::Encode(Encode(qt_qnan()));return QV4::Encode(Encode(qt_qnan()));Executed by:
executed 8 times by 1 test: return QV4::Encode(Encode(qt_qnan()));Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 305 | else | - | ||||||||||||||||||||||||||||||||||||
| 306 | return executed 40 times by 1 test: QV4::Encode(Encode(std::log10(v)));return QV4::Encode(Encode(std::log10(v)));Executed by:
executed 40 times by 1 test: return QV4::Encode(Encode(std::log10(v)));Executed by:
| 40 | ||||||||||||||||||||||||||||||||||||
| 307 | } | - | ||||||||||||||||||||||||||||||||||||
| 308 | - | |||||||||||||||||||||||||||||||||||||
| 309 | ReturnedValue MathObject::method_log1p(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 310 | { | - | ||||||||||||||||||||||||||||||||||||
| 311 | - | |||||||||||||||||||||||||||||||||||||
| 312 | using std::log1p; | - | ||||||||||||||||||||||||||||||||||||
| 313 | - | |||||||||||||||||||||||||||||||||||||
| 314 | double v = argc
| 0-32 | ||||||||||||||||||||||||||||||||||||
| 315 | if (v < -1
| 12-20 | ||||||||||||||||||||||||||||||||||||
| 316 | return executed 12 times by 1 test: QV4::Encode(Encode(qt_qnan()));return QV4::Encode(Encode(qt_qnan()));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(qt_qnan()));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 317 | else | - | ||||||||||||||||||||||||||||||||||||
| 318 | return executed 20 times by 1 test: QV4::Encode(Encode(log1p(v)));return QV4::Encode(Encode(log1p(v)));Executed by:
executed 20 times by 1 test: return QV4::Encode(Encode(log1p(v)));Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
| 319 | } | - | ||||||||||||||||||||||||||||||||||||
| 320 | - | |||||||||||||||||||||||||||||||||||||
| 321 | ReturnedValue MathObject::method_log2(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 322 | { | - | ||||||||||||||||||||||||||||||||||||
| 323 | double v = argc
| 0-52 | ||||||||||||||||||||||||||||||||||||
| 324 | if (v < 0
| 12-40 | ||||||||||||||||||||||||||||||||||||
| 325 | return executed 12 times by 1 test: QV4::Encode(Encode(qt_qnan()));return QV4::Encode(Encode(qt_qnan()));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(qt_qnan()));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 326 | } else { | - | ||||||||||||||||||||||||||||||||||||
| 327 | - | |||||||||||||||||||||||||||||||||||||
| 328 | - | |||||||||||||||||||||||||||||||||||||
| 329 | - | |||||||||||||||||||||||||||||||||||||
| 330 | - | |||||||||||||||||||||||||||||||||||||
| 331 | - | |||||||||||||||||||||||||||||||||||||
| 332 | return executed 40 times by 1 test: QV4::Encode(Encode(std::log2(v)));return QV4::Encode(Encode(std::log2(v)));Executed by:
executed 40 times by 1 test: return QV4::Encode(Encode(std::log2(v)));Executed by:
| 40 | ||||||||||||||||||||||||||||||||||||
| 333 | - | |||||||||||||||||||||||||||||||||||||
| 334 | } | - | ||||||||||||||||||||||||||||||||||||
| 335 | } | - | ||||||||||||||||||||||||||||||||||||
| 336 | - | |||||||||||||||||||||||||||||||||||||
| 337 | ReturnedValue MathObject::method_max(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 338 | { | - | ||||||||||||||||||||||||||||||||||||
| 339 | double mx = -qt_inf(); | - | ||||||||||||||||||||||||||||||||||||
| 340 | for (int i = 0, ei = argc; i < ei
| 5692-11956 | ||||||||||||||||||||||||||||||||||||
| 341 | double x = argv[i].toNumber(); | - | ||||||||||||||||||||||||||||||||||||
| 342 | if (x > mx
| 828-9471 | ||||||||||||||||||||||||||||||||||||
| 343 | mx = x; executed 10299 times by 7 tests: mx = x;Executed by:
| 10299 | ||||||||||||||||||||||||||||||||||||
| 344 | } executed 11956 times by 7 tests: end of blockExecuted by:
| 11956 | ||||||||||||||||||||||||||||||||||||
| 345 | return executed 5692 times by 7 tests: QV4::Encode(Encode(mx));return QV4::Encode(Encode(mx));Executed by:
executed 5692 times by 7 tests: return QV4::Encode(Encode(mx));Executed by:
| 5692 | ||||||||||||||||||||||||||||||||||||
| 346 | } | - | ||||||||||||||||||||||||||||||||||||
| 347 | - | |||||||||||||||||||||||||||||||||||||
| 348 | ReturnedValue MathObject::method_min(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 349 | { | - | ||||||||||||||||||||||||||||||||||||
| 350 | double mx = qt_inf(); | - | ||||||||||||||||||||||||||||||||||||
| 351 | for (int i = 0, ei = argc; i < ei
| 2650-5876 | ||||||||||||||||||||||||||||||||||||
| 352 | double x = argv[i].toNumber(); | - | ||||||||||||||||||||||||||||||||||||
| 353 | if ((x == 0
| 20-4744 | ||||||||||||||||||||||||||||||||||||
| 354 | || (
| 828-4039 | ||||||||||||||||||||||||||||||||||||
| 355 | mx = x; | - | ||||||||||||||||||||||||||||||||||||
| 356 | } executed 4887 times by 5 tests: end of blockExecuted by:
| 4887 | ||||||||||||||||||||||||||||||||||||
| 357 | } executed 5876 times by 5 tests: end of blockExecuted by:
| 5876 | ||||||||||||||||||||||||||||||||||||
| 358 | return executed 2650 times by 5 tests: QV4::Encode(Encode(mx));return QV4::Encode(Encode(mx));Executed by:
executed 2650 times by 5 tests: return QV4::Encode(Encode(mx));Executed by:
| 2650 | ||||||||||||||||||||||||||||||||||||
| 359 | } | - | ||||||||||||||||||||||||||||||||||||
| 360 | - | |||||||||||||||||||||||||||||||||||||
| 361 | ReturnedValue MathObject::method_pow(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 362 | { | - | ||||||||||||||||||||||||||||||||||||
| 363 | double x = argc > 0
| 0-3015520 | ||||||||||||||||||||||||||||||||||||
| 364 | double y = argc > 1
| 0-3015521 | ||||||||||||||||||||||||||||||||||||
| 365 | - | |||||||||||||||||||||||||||||||||||||
| 366 | if (std::isnan(y)
| 40-3015480 | ||||||||||||||||||||||||||||||||||||
| 367 | return executed 40 times by 1 test: QV4::Encode(Encode(qt_qnan()));return QV4::Encode(Encode(qt_qnan()));Executed by:
executed 40 times by 1 test: return QV4::Encode(Encode(qt_qnan()));Executed by:
| 40 | ||||||||||||||||||||||||||||||||||||
| 368 | - | |||||||||||||||||||||||||||||||||||||
| 369 | if (y == 0
| 753736-2261744 | ||||||||||||||||||||||||||||||||||||
| 370 | return executed 753736 times by 1 test: QV4::Encode(Encode(1));return QV4::Encode(Encode(1));Executed by:
executed 753736 times by 1 test: return QV4::Encode(Encode(1));Executed by:
| 753736 | ||||||||||||||||||||||||||||||||||||
| 371 | } else if (((
| 12-2261731 | ||||||||||||||||||||||||||||||||||||
| 372 | return executed 16 times by 1 test: QV4::Encode(Encode(qt_qnan()));return QV4::Encode(Encode(qt_qnan()));Executed by:
executed 16 times by 1 test: return QV4::Encode(Encode(qt_qnan()));Executed by:
| 16 | ||||||||||||||||||||||||||||||||||||
| 373 | } else if (((
| 20-2261610 | ||||||||||||||||||||||||||||||||||||
| 374 | return executed 24 times by 1 test: QV4::Encode(Encode(qInf()));return QV4::Encode(Encode(qInf()));Executed by:
executed 24 times by 1 test: return QV4::Encode(Encode(qInf()));Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
| 375 | } else if ((
| 20-2261610 | ||||||||||||||||||||||||||||||||||||
| 376 | if (y < 0
| 36-40 | ||||||||||||||||||||||||||||||||||||
| 377 | if (std::fmod(-y, 2.0) == 1.0
| 12-28 | ||||||||||||||||||||||||||||||||||||
| 378 | return executed 12 times by 1 test: QV4::Encode(Encode(-qt_inf()));return QV4::Encode(Encode(-qt_inf()));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(-qt_inf()));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 379 | else | - | ||||||||||||||||||||||||||||||||||||
| 380 | return executed 28 times by 1 test: QV4::Encode(Encode(qt_inf()));return QV4::Encode(Encode(qt_inf()));Executed by:
executed 28 times by 1 test: return QV4::Encode(Encode(qt_inf()));Executed by:
| 28 | ||||||||||||||||||||||||||||||||||||
| 381 | } else if (y > 0
| 0-36 | ||||||||||||||||||||||||||||||||||||
| 382 | if (std::fmod(y, 2.0) == 1.0
| 12-24 | ||||||||||||||||||||||||||||||||||||
| 383 | return executed 12 times by 1 test: QV4::Encode(Encode(copySign(0, -1.0)));return QV4::Encode(Encode(copySign(0, -1.0)));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(copySign(0, -1.0)));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 384 | else | - | ||||||||||||||||||||||||||||||||||||
| 385 | return executed 24 times by 1 test: QV4::Encode(Encode(0));return QV4::Encode(Encode(0));Executed by:
executed 24 times by 1 test: return QV4::Encode(Encode(0));Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
| 386 | } | - | ||||||||||||||||||||||||||||||||||||
| 387 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 388 | else { | - | ||||||||||||||||||||||||||||||||||||
| 389 | return executed 2261629 times by 1 test: QV4::Encode(Encode(std::pow(x, y)));return QV4::Encode(Encode(std::pow(x, y)));Executed by:
executed 2261629 times by 1 test: return QV4::Encode(Encode(std::pow(x, y)));Executed by:
| 2261629 | ||||||||||||||||||||||||||||||||||||
| 390 | } | - | ||||||||||||||||||||||||||||||||||||
| 391 | - | |||||||||||||||||||||||||||||||||||||
| 392 | return never executed: QV4::Encode(Encode(qt_qnan()));return QV4::Encode(Encode(qt_qnan()));never executed: return QV4::Encode(Encode(qt_qnan())); | 0 | ||||||||||||||||||||||||||||||||||||
| 393 | } | - | ||||||||||||||||||||||||||||||||||||
| 394 | - | |||||||||||||||||||||||||||||||||||||
| 395 | ReturnedValue MathObject::method_random(const FunctionObject *, const Value *, const Value *, int) | - | ||||||||||||||||||||||||||||||||||||
| 396 | { | - | ||||||||||||||||||||||||||||||||||||
| 397 | return executed 7573 times by 6 tests: QV4::Encode(Encode(QRandomGenerator::global()->generateDouble()));return QV4::Encode(Encode(QRandomGenerator::global()->generateDouble()));Executed by:
executed 7573 times by 6 tests: return QV4::Encode(Encode(QRandomGenerator::global()->generateDouble()));Executed by:
| 7573 | ||||||||||||||||||||||||||||||||||||
| 398 | } | - | ||||||||||||||||||||||||||||||||||||
| 399 | - | |||||||||||||||||||||||||||||||||||||
| 400 | ReturnedValue MathObject::method_round(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 401 | { | - | ||||||||||||||||||||||||||||||||||||
| 402 | double v = argc
| 0-8408 | ||||||||||||||||||||||||||||||||||||
| 403 | if (std::isnan(v)
| 4-8404 | ||||||||||||||||||||||||||||||||||||
| 404 | return executed 32 times by 2 tests: QV4::Encode(Encode(v));return QV4::Encode(Encode(v));Executed by:
executed 32 times by 2 tests: return QV4::Encode(Encode(v));Executed by:
| 32 | ||||||||||||||||||||||||||||||||||||
| 405 | - | |||||||||||||||||||||||||||||||||||||
| 406 | v = copySign(std::floor(v + 0.5), v); | - | ||||||||||||||||||||||||||||||||||||
| 407 | return executed 8376 times by 2 tests: QV4::Encode(Encode(v));return QV4::Encode(Encode(v));Executed by:
executed 8376 times by 2 tests: return QV4::Encode(Encode(v));Executed by:
| 8376 | ||||||||||||||||||||||||||||||||||||
| 408 | } | - | ||||||||||||||||||||||||||||||||||||
| 409 | - | |||||||||||||||||||||||||||||||||||||
| 410 | ReturnedValue MathObject::method_sign(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 411 | { | - | ||||||||||||||||||||||||||||||||||||
| 412 | double v = argc
| 0-36 | ||||||||||||||||||||||||||||||||||||
| 413 | - | |||||||||||||||||||||||||||||||||||||
| 414 | if (std::isnan(v)
| 4-32 | ||||||||||||||||||||||||||||||||||||
| 415 | return executed 4 times by 1 test: QV4::Encode(Encode(qt_qnan()));return QV4::Encode(Encode(qt_qnan()));Executed by:
executed 4 times by 1 test: return QV4::Encode(Encode(qt_qnan()));Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 416 | - | |||||||||||||||||||||||||||||||||||||
| 417 | if (qIsNull(v)
| 8-24 | ||||||||||||||||||||||||||||||||||||
| 418 | return executed 8 times by 1 test: QV4::Encode(Encode(v));return QV4::Encode(Encode(v));Executed by:
executed 8 times by 1 test: return QV4::Encode(Encode(v));Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 419 | - | |||||||||||||||||||||||||||||||||||||
| 420 | return executed 24 times by 1 test: QV4::Encode(Encode(std::signbit(v) ? -1 : 1));return QV4::Encode(Encode(std::signbit(v) ? -1 : 1));Executed by:
executed 24 times by 1 test: return QV4::Encode(Encode(std::signbit(v) ? -1 : 1));Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
| 421 | } | - | ||||||||||||||||||||||||||||||||||||
| 422 | - | |||||||||||||||||||||||||||||||||||||
| 423 | ReturnedValue MathObject::method_sin(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 424 | { | - | ||||||||||||||||||||||||||||||||||||
| 425 | double v = argc
| 0-490 | ||||||||||||||||||||||||||||||||||||
| 426 | if (v == 0.0
| 24-466 | ||||||||||||||||||||||||||||||||||||
| 427 | return executed 24 times by 2 tests: QV4::Encode(Encode(v));return QV4::Encode(Encode(v));Executed by:
executed 24 times by 2 tests: return QV4::Encode(Encode(v));Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
| 428 | else | - | ||||||||||||||||||||||||||||||||||||
| 429 | return executed 466 times by 2 tests: QV4::Encode(Encode(std::sin(v)));return QV4::Encode(Encode(std::sin(v)));Executed by:
executed 466 times by 2 tests: return QV4::Encode(Encode(std::sin(v)));Executed by:
| 466 | ||||||||||||||||||||||||||||||||||||
| 430 | } | - | ||||||||||||||||||||||||||||||||||||
| 431 | - | |||||||||||||||||||||||||||||||||||||
| 432 | ReturnedValue MathObject::method_sinh(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 433 | { | - | ||||||||||||||||||||||||||||||||||||
| 434 | double v = argc
| 0-20 | ||||||||||||||||||||||||||||||||||||
| 435 | if (v == 0.0
| 8-12 | ||||||||||||||||||||||||||||||||||||
| 436 | return executed 8 times by 1 test: QV4::Encode(Encode(v));return QV4::Encode(Encode(v));Executed by:
executed 8 times by 1 test: return QV4::Encode(Encode(v));Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 437 | else | - | ||||||||||||||||||||||||||||||||||||
| 438 | return executed 12 times by 1 test: QV4::Encode(Encode(std::sinh(v)));return QV4::Encode(Encode(std::sinh(v)));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(std::sinh(v)));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 439 | } | - | ||||||||||||||||||||||||||||||||||||
| 440 | - | |||||||||||||||||||||||||||||||||||||
| 441 | ReturnedValue MathObject::method_sqrt(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 442 | { | - | ||||||||||||||||||||||||||||||||||||
| 443 | double v = argc
| 0-28 | ||||||||||||||||||||||||||||||||||||
| 444 | return executed 28 times by 1 test: QV4::Encode(Encode(std::sqrt(v)));return QV4::Encode(Encode(std::sqrt(v)));Executed by:
executed 28 times by 1 test: return QV4::Encode(Encode(std::sqrt(v)));Executed by:
| 28 | ||||||||||||||||||||||||||||||||||||
| 445 | } | - | ||||||||||||||||||||||||||||||||||||
| 446 | - | |||||||||||||||||||||||||||||||||||||
| 447 | ReturnedValue MathObject::method_tan(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 448 | { | - | ||||||||||||||||||||||||||||||||||||
| 449 | double v = argc
| 0-20 | ||||||||||||||||||||||||||||||||||||
| 450 | if (v == 0.0
| 8-12 | ||||||||||||||||||||||||||||||||||||
| 451 | return executed 8 times by 1 test: QV4::Encode(Encode(v));return QV4::Encode(Encode(v));Executed by:
executed 8 times by 1 test: return QV4::Encode(Encode(v));Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 452 | else | - | ||||||||||||||||||||||||||||||||||||
| 453 | return executed 12 times by 1 test: QV4::Encode(Encode(std::tan(v)));return QV4::Encode(Encode(std::tan(v)));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(std::tan(v)));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 454 | } | - | ||||||||||||||||||||||||||||||||||||
| 455 | - | |||||||||||||||||||||||||||||||||||||
| 456 | ReturnedValue MathObject::method_tanh(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 457 | { | - | ||||||||||||||||||||||||||||||||||||
| 458 | double v = argc
| 0-20 | ||||||||||||||||||||||||||||||||||||
| 459 | if (v == 0.0
| 8-12 | ||||||||||||||||||||||||||||||||||||
| 460 | return executed 8 times by 1 test: QV4::Encode(Encode(v));return QV4::Encode(Encode(v));Executed by:
executed 8 times by 1 test: return QV4::Encode(Encode(v));Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 461 | else | - | ||||||||||||||||||||||||||||||||||||
| 462 | return executed 12 times by 1 test: QV4::Encode(Encode(std::tanh(v)));return QV4::Encode(Encode(std::tanh(v)));Executed by:
executed 12 times by 1 test: return QV4::Encode(Encode(std::tanh(v)));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 463 | } | - | ||||||||||||||||||||||||||||||||||||
| 464 | - | |||||||||||||||||||||||||||||||||||||
| 465 | ReturnedValue MathObject::method_trunc(const FunctionObject *, const Value *, const Value *argv, int argc) | - | ||||||||||||||||||||||||||||||||||||
| 466 | { | - | ||||||||||||||||||||||||||||||||||||
| 467 | double v = argc
| 0-116 | ||||||||||||||||||||||||||||||||||||
| 468 | - | |||||||||||||||||||||||||||||||||||||
| 469 | - | |||||||||||||||||||||||||||||||||||||
| 470 | - | |||||||||||||||||||||||||||||||||||||
| 471 | - | |||||||||||||||||||||||||||||||||||||
| 472 | - | |||||||||||||||||||||||||||||||||||||
| 473 | - | |||||||||||||||||||||||||||||||||||||
| 474 | - | |||||||||||||||||||||||||||||||||||||
| 475 | return executed 116 times by 1 test: QV4::Encode(Encode(std::trunc(v)));return QV4::Encode(Encode(std::trunc(v)));Executed by:
executed 116 times by 1 test: return QV4::Encode(Encode(std::trunc(v)));Executed by:
| 116 | ||||||||||||||||||||||||||||||||||||
| 476 | - | |||||||||||||||||||||||||||||||||||||
| 477 | } | - | ||||||||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |