MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / getFloat

Method getFloat

ir/type.cpp:433–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433expr FloatType::getFloat(const expr &v) const {
434 expr ty = getDummyFloat();
435
436 if (isNaNInt(v))
437 return expr::mkNaN(ty);
438
439 expr cond, then, els, n, n2;
440 // match (ite (isNaN x) int_nan (fp.to_ieee_bv x))
441 if (v.isIf(cond, then, els) &&
442 cond.isNaNCheck(n) &&
443 isNaNInt(then) &&
444 els.isfloat2BV(n2) &&
445 n.eq(n2))
446 return n;
447
448 return v.BV2float(ty);
449}
450
451expr FloatType::fromFloat(State &s, const expr &fp, const Type &from_type0,
452 unsigned nary, const expr &a, const expr &b,

Callers 5

fromFloatMethod · 0.80
encodeMethod · 0.80
isfpclassFunction · 0.80
fm_poisonFunction · 0.80
toSMTMethod · 0.80

Calls 5

isIfMethod · 0.80
isNaNCheckMethod · 0.80
isfloat2BVMethod · 0.80
BV2floatMethod · 0.80
eqMethod · 0.45

Tested by

no test coverage detected