MCPcopy Create free account
hub / github.com/ablab/spades / convertFromAPInt

Method convertFromAPInt

ext/src/llvm/APFloat.cpp:2434–2446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2432}
2433
2434IEEEFloat::opStatus IEEEFloat::convertFromAPInt(const APInt &Val, bool isSigned,
2435 roundingMode rounding_mode) {
2436 unsigned int partCount = Val.getNumWords();
2437 APInt api = Val;
2438
2439 sign = false;
2440 if (isSigned && api.isNegative()) {
2441 sign = true;
2442 api = -api;
2443 }
2444
2445 return convertFromUnsignedParts(api.getRawData(), partCount, rounding_mode);
2446}
2447
2448/* Convert a two's complement integer SRC to a floating point number,
2449 rounding according to ROUNDING_MODE. ISSIGNED is true if the

Callers 1

roundToIntegralMethod · 0.45

Calls 4

assertClass · 0.85
DoubleAPFloatClass · 0.85
isNegativeMethod · 0.45
bitcastToAPIntMethod · 0.45

Tested by

no test coverage detected