INNER CODE UNIT · C++

temp

margelo/react-native-bignumber · cpp/MGBigNumberHostObject.cpp:622

            std::shared_ptr<MGBigNumber> temp = std::make_shared<MGBigNumber>(thiz->ctx);

            BN_zero(temp->bign);
            BN_set_bit(temp->bign, value);
            BN_add(thiz->bign, temp->bign, thiz->bign);
            return jsi::Value::undefined();
        }));

        this->fields.push_back(HOST_LAMBDA("inotn", {
            std::shared_ptr<MGBigNumber> thiz = thisValue.getObject(runtime).getHostObject<MGBigNumber>(runtime);
            const jsi::Value &otherValue = arguments[0];
            if (!otherValue.isNumber())
            {
                throw jsi::JSError(runtime, "testn expects integer");
            }
            unsigned int len = otherValue.asNumber();

            MGBigNumHelper::BN_notn(thiz->bign, len);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…