| 262 | } |
| 263 | |
| 264 | MathLib::value MathLib::value::shiftLeft(const MathLib::value &v) const |
| 265 | { |
| 266 | if (!isInt() || !v.isInt()) |
| 267 | throw InternalError(nullptr, "Shift operand is not integer"); |
| 268 | MathLib::value ret(*this); |
| 269 | if (v.mIntValue >= MathLib::bigint_bits) { |
| 270 | return ret; |
| 271 | } |
| 272 | ret.mIntValue <<= v.mIntValue; |
| 273 | return ret; |
| 274 | } |
| 275 | |
| 276 | MathLib::value MathLib::value::shiftRight(const MathLib::value &v) const |
| 277 | { |