MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / toInt64

Method toInt64

src/common/Int128.cpp:466–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464}
465
466SINT64 Int128::toInt64(int scale) const
467{
468 Int128 tmp(*this);
469 tmp.setScale(scale);
470 if (tmp.v < i64min.v || tmp.v > i64max.v)
471 overflow();
472
473 unsigned dwords[4];
474 tmp.getTable32(dwords);
475 SINT64 rc = int(dwords[1]);
476 rc <<= 32;
477 rc += dwords[0];
478
479 return rc;
480}
481
482double Int128::toDouble() const
483{

Callers 3

aggExecuteMethod · 0.45
CVT_get_int64Function · 0.45
ticksToNanosecondsFunction · 0.45

Calls 2

setScaleMethod · 0.45
getTable32Method · 0.45

Tested by

no test coverage detected