LLVM: include/llvm/ADT/APFloat.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15#ifndef LLVM_ADT_APFLOAT_H

16#define LLVM_ADT_APFLOAT_H

17

24#include

25

26#define APFLOAT_DISPATCH_ON_SEMANTICS(METHOD_CALL) \

27 do { \

28 if (usesLayout(getSemantics())) \

29 return U.IEEE.METHOD_CALL; \

30 if (usesLayout(getSemantics())) \

31 return U.Double.METHOD_CALL; \

32 llvm_unreachable("Unexpected semantics"); \

33 } while (false)

34

35namespace llvm {

36

37struct fltSemantics;

38class APSInt;

39class StringRef;

40class APFloat;

41class raw_ostream;

42

43template class Expected;

44template class SmallVectorImpl;

45

46

47

48

49

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

142class IEEEFloat;

143class DoubleAPFloat;

144}

145

146

147

148

150public:

153

154

156

157

158

165

166

167

168

169

170

171

172

173

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

200

201

203

204

205

206

207

208

210

211

213

214

215

216

218

219

220

221

222

223

225

226

227

228

229

230

232

233

235

236

237

239

240

241

242

243

244

246

247

248

250

251

252

254

255

256

258

261 };

262

265

266private:

288

292

293public:

301 return semPPCDoubleDoubleLegacy;

302 }

309 return semFloat8E4M3B11FNUZ;

310 }

318 return semX87DoubleExtended;

319 }

320

321

322

324

325

326

327

330

331

332

333

340

341

343

351

352

353

354

355

356

357

358

359

368

369

376

377

381

382

388

394 bool);

401

402

403

406

407

408

410};

411

413

444

446public:

447

448

449

459

460

461

462

464

465

466

467

468

469

470

471

472

477

479

484

486

487

488

489

490

491

493

494

495

496

497

498

506#ifdef HAS_IEE754_FLOAT128

507 LLVM_ABI float128 convertToQuad() const;

508#endif

510

511

512

513

514

515

517

518

519

521

522

524

525

526

527

530

531

532

533

534

535

536

537

539

540

541

542

543

545

546

547

548

549

551

552

553 bool isZero() const { return category == fltCategory::fcZero; }

554

555

556

558

559

561

562

564

565

567

568

569

570

571

572

575 bool isNonZero() const { return category != fltCategory::fcZero; }

579

580

581

583

584

585

587

588

589

591

592

594

595

596

599

600

601

602

603

604

605

606

607

608

610

611

612

613

614

615

616

617

618

619

620

621

622

623

624

625

626

627

628

629

630

631

632

633

634

635

636

638 unsigned FormatPrecision = 0,

639 unsigned FormatMaxPadding = 3,

640 bool TruncateZero = true) const;

641

643

645

647

649

650

651

652

655 LLVM_ABI void makeNaN(bool SNaN = false, bool Neg = false,

660

661

662

663

664

666

667

668

670

671private:

672

673

674

676 const integerPart *significandParts() const;

677 LLVM_ABI unsigned int partCount() const;

678

679

680

681

682

683

686

690 bool ignoreAddend = false);

693 void incrementSignificand();

695 void shiftSignificandLeft(unsigned int);

696 lostFraction shiftSignificandRight(unsigned int);

697 unsigned int significandLSB() const;

698 unsigned int significandMSB() const;

699 void zeroSignificand();

700 unsigned int getNumHighBits() const;

701

702 bool isSignificandAllOnes() const;

703 bool isSignificandAllOnesExceptLSB() const;

704

705 bool isSignificandAllZeros() const;

706 bool isSignificandAllZerosExceptMSB() const;

707

708

709

710

711

712

718

719

720

721

722

723

724 bool convertFromStringSpecials(StringRef str);

731 bool *) const;

736 char *convertNormalToHexString(char *, unsigned int, bool,

738 opStatus roundSignificandWithExponent(const integerPart *, unsigned int, int,

743

744

745

746 template <const fltSemantics &S> APInt convertIEEEFloatToAPInt() const;

747 APInt convertHalfAPFloatToAPInt() const;

748 APInt convertBFloatAPFloatToAPInt() const;

749 APInt convertFloatAPFloatToAPInt() const;

750 APInt convertDoubleAPFloatToAPInt() const;

751 APInt convertQuadrupleAPFloatToAPInt() const;

752 APInt convertF80LongDoubleAPFloatToAPInt() const;

753 APInt convertPPCDoubleDoubleLegacyAPFloatToAPInt() const;

754 APInt convertFloat8E5M2APFloatToAPInt() const;

755 APInt convertFloat8E5M2FNUZAPFloatToAPInt() const;

756 APInt convertFloat8E4M3APFloatToAPInt() const;

757 APInt convertFloat8E4M3FNAPFloatToAPInt() const;

758 APInt convertFloat8E4M3FNUZAPFloatToAPInt() const;

759 APInt convertFloat8E4M3B11FNUZAPFloatToAPInt() const;

760 APInt convertFloat8E3M4APFloatToAPInt() const;

761 APInt convertFloatTF32APFloatToAPInt() const;

762 APInt convertFloat8E8M0FNUAPFloatToAPInt() const;

763 APInt convertFloat6E3M2FNAPFloatToAPInt() const;

764 APInt convertFloat6E2M3FNAPFloatToAPInt() const;

765 APInt convertFloat4E2M1FNAPFloatToAPInt() const;

767 template <const fltSemantics &S> void initFromIEEEAPInt(const APInt &api);

768 void initFromHalfAPInt(const APInt &api);

769 void initFromBFloatAPInt(const APInt &api);

770 void initFromFloatAPInt(const APInt &api);

771 void initFromDoubleAPInt(const APInt &api);

772 void initFromQuadrupleAPInt(const APInt &api);

773 void initFromF80LongDoubleAPInt(const APInt &api);

774 void initFromPPCDoubleDoubleLegacyAPInt(const APInt &api);

775 void initFromFloat8E5M2APInt(const APInt &api);

776 void initFromFloat8E5M2FNUZAPInt(const APInt &api);

777 void initFromFloat8E4M3APInt(const APInt &api);

778 void initFromFloat8E4M3FNAPInt(const APInt &api);

779 void initFromFloat8E4M3FNUZAPInt(const APInt &api);

780 void initFromFloat8E4M3B11FNUZAPInt(const APInt &api);

781 void initFromFloat8E3M4APInt(const APInt &api);

782 void initFromFloatTF32APInt(const APInt &api);

783 void initFromFloat8E8M0FNUAPInt(const APInt &api);

784 void initFromFloat6E3M2FNAPInt(const APInt &api);

785 void initFromFloat6E2M3FNAPInt(const APInt &api);

786 void initFromFloat4E2M1FNAPInt(const APInt &api);

787

789 void copySignificand(const IEEEFloat &);

790 void freeSignificand();

791

792

793

795

796

797

798

799 union Significand {

802 } significand;

803

804

806

807

808

809

810

811 fltCategory category : 3;

812

813

814 unsigned int sign : 1;

815

817};

818

823

824

825

826

827

829

832

835

839 unsigned int Width, bool IsSigned,

841

842

843

844

847

848

849

851

852public:

862

865

867

872

885

888

895

901

903 unsigned int Width, bool IsSigned,

908 bool UpperCase,

910

916

918 unsigned FormatMaxPadding,

919 bool TruncateZero = true) const;

920

922

929};

930

935

936}

937

938

939

943

944 static_assert(std::is_standard_layout::value);

945

946 union Storage {

948 IEEEFloat IEEE;

949 DoubleAPFloat Double;

950

952 explicit Storage(DoubleAPFloat F, const fltSemantics &S)

953 : Double(std::move(F)) {

955 }

956

957 template <typename... ArgTypes>

959 if (usesLayout(Semantics)) {

961 return;

962 }

963 if (usesLayout(Semantics)) {

965 return;

966 }

968 }

969

975 } U;

976

978 static_assert(std::is_same<T, IEEEFloat>::value ||

979 std::is_same<T, DoubleAPFloat>::value);

980 if (std::is_same<T, DoubleAPFloat>::value) {

982 }

984 }

985

986 IEEEFloat &getIEEE() {

987 if (usesLayout(*U.semantics))

988 return U.IEEE;

989 if (usesLayout(*U.semantics))

990 return U.Double.getFirst().U.IEEE;

992 }

993

994 const IEEEFloat &getIEEE() const {

995 if (usesLayout(*U.semantics))

996 return U.IEEE;

997 if (usesLayout(*U.semantics))

998 return U.Double.getFirst().U.IEEE;

1000 }

1001

1003

1005

1006 void makeNaN(bool SNaN, bool Neg, const APInt *fill) {

1008 }

1009

1010 void makeLargest(bool Neg) {

1012 }

1013

1014 void makeSmallest(bool Neg) {

1016 }

1017

1018 void makeSmallestNormalized(bool Neg) {

1020 }

1021

1024 : U(std::move(F), S) {}

1025

1026

1027

1028 cmpResult compareAbsoluteValue(const APFloat &RHS) const {

1030 "Should only compare APFloats with the same semantics");

1032 return U.IEEE.compareAbsoluteValue(RHS.U.IEEE);

1033 if (usesLayout(getSemantics()))

1034 return U.Double.compareAbsoluteValue(RHS.U.Double);

1036 }

1037

1038public:

1042 template <typename T,

1043 typename = std::enable_if_t<std::is_floating_point::value>>

1045

1053

1055

1057

1058

1059

1060

1063 Val.makeZero(Negative);

1064 return Val;

1065 }

1066

1067

1068

1069

1071 APFloat Val(Sem, 1U);

1072 if (Negative)

1074 return Val;

1075 }

1076

1077

1078

1079

1082 Val.makeInf(Negative);

1083 return Val;

1084 }

1085

1086

1087

1088

1089

1090

1093 if (payload) {

1094 APInt intPayload(64, payload);

1095 return getQNaN(Sem, Negative, &intPayload);

1096 } else {

1097 return getQNaN(Sem, Negative, nullptr);

1098 }

1099 }

1100

1101

1103 const APInt *payload = nullptr) {

1105 Val.makeNaN(false, Negative, payload);

1106 return Val;

1107 }

1108

1109

1111 const APInt *payload = nullptr) {

1113 Val.makeNaN(true, Negative, payload);

1114 return Val;

1115 }

1116

1117

1118

1119

1122 Val.makeLargest(Negative);

1123 return Val;

1124 }

1125

1126

1127

1128

1129

1132 Val.makeSmallest(Negative);

1133 return Val;

1134 }

1135

1136

1137

1138

1139

1141 bool Negative = false) {

1143 Val.makeSmallestNormalized(Negative);

1144 return Val;

1145 }

1146

1147

1148

1149

1151

1152

1153

1154

1158

1159

1160

1162

1165 "Should only call on two APFloats with the same semantics");

1167 return U.IEEE.add(RHS.U.IEEE, RM);

1168 if (usesLayout(getSemantics()))

1169 return U.Double.add(RHS.U.Double, RM);

1171 }

1174 "Should only call on two APFloats with the same semantics");

1176 return U.IEEE.subtract(RHS.U.IEEE, RM);

1177 if (usesLayout(getSemantics()))

1178 return U.Double.subtract(RHS.U.Double, RM);

1180 }

1183 "Should only call on two APFloats with the same semantics");

1185 return U.IEEE.multiply(RHS.U.IEEE, RM);

1186 if (usesLayout(getSemantics()))

1187 return U.Double.multiply(RHS.U.Double, RM);

1189 }

1192 "Should only call on two APFloats with the same semantics");

1194 return U.IEEE.divide(RHS.U.IEEE, RM);

1195 if (usesLayout(getSemantics()))

1196 return U.Double.divide(RHS.U.Double, RM);

1198 }

1201 "Should only call on two APFloats with the same semantics");

1203 return U.IEEE.remainder(RHS.U.IEEE);

1204 if (usesLayout(getSemantics()))

1205 return U.Double.remainder(RHS.U.Double);

1207 }

1210 "Should only call on two APFloats with the same semantics");

1212 return U.IEEE.mod(RHS.U.IEEE);

1213 if (usesLayout(getSemantics()))

1214 return U.Double.mod(RHS.U.Double);

1216 }

1220 "Should only call on APFloats with the same semantics");

1222 "Should only call on APFloats with the same semantics");

1224 return U.IEEE.fusedMultiplyAdd(Multiplicand.U.IEEE, Addend.U.IEEE, RM);

1225 if (usesLayout(getSemantics()))

1226 return U.Double.fusedMultiplyAdd(Multiplicand.U.Double, Addend.U.Double,

1227 RM);

1229 }

1233

1234

1235

1239

1240

1242 APFloat Result(*this);

1243 Result.changeSign();

1244 return Result;

1245 }

1246

1247

1248

1250 APFloat Result(*this);

1252 return Result;

1253 }

1254

1255

1256

1258 APFloat Result(*this);

1260 return Result;

1261 }

1262

1263

1264

1266 APFloat Result(*this);

1268 return Result;

1269 }

1270

1271

1272

1274 APFloat Result(*this);

1276 return Result;

1277 }

1278

1288

1289

1290

1292 Value.copySign(Sign);

1294 }

1295

1296

1297

1299 APFloat Result(*this);

1300 Result.getIEEE().makeQuiet();

1301 return Result;

1302 }

1303

1305 bool *losesInfo);

1306

1307

1308

1309

1310

1311

1312

1313

1315 unsigned int Width, bool IsSigned, roundingMode RM,

1316 bool *IsExact) const {

1319 }

1320

1321

1322

1324 bool *IsExact) const;

1325

1326

1327

1328

1333

1338

1339

1340

1341

1342

1343

1345

1346

1347

1348

1349

1350

1351#ifdef HAS_IEE754_FLOAT128

1352 LLVM_ABI float128 convertToQuad() const;

1353#endif

1354

1355

1356

1357

1358

1359

1361

1363

1365

1369

1373

1378

1383

1384

1385

1388 "Should only compare APFloats with the same semantics");

1390 return U.IEEE.compare(RHS.U.IEEE);

1391 if (usesLayout(getSemantics()))

1392 return U.Double.compare(RHS.U.Double);

1394 }

1395

1398 return false;

1400 return U.IEEE.bitwiseIsEqual(RHS.U.IEEE);

1401 if (usesLayout(getSemantics()))

1402 return U.Double.bitwiseIsEqual(RHS.U.Double);

1404 }

1405

1406

1407

1408

1409

1410

1411

1412

1413

1415 bool ignored;

1416 APFloat Tmp(V);

1419 }

1420

1426

1430

1431 bool isNegative() const { return getIEEE().isNegative(); }

1433 bool isSignaling() const { return getIEEE().isSignaling(); }

1434

1437

1449

1453

1454

1456

1459

1461 unsigned FormatMaxPadding = 3, bool TruncateZero = true) const {

1463 toString(Str, FormatPrecision, FormatMaxPadding, TruncateZero));

1464 }

1465

1467

1468#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)

1470#endif

1471

1472

1473

1475

1476

1477

1482

1483

1484

1489

1494 friend IEEEFloat;

1495 friend DoubleAPFloat;

1496};

1497

1499 "Empty base class optimization is not performed.");

1500

1501

1502

1503

1504

1506

1507

1508

1509

1510

1511

1512

1513

1514

1515

1516inline int ilogb(const APFloat &Arg) {

1517 if (APFloat::usesLayoutdetail::IEEEFloat(Arg.getSemantics()))

1518 return ilogb(Arg.U.IEEE);

1519 if (APFloat::usesLayoutdetail::DoubleAPFloat(Arg.getSemantics()))

1520 return ilogb(Arg.U.Double);

1522}

1523

1524

1526 if (APFloat::usesLayoutdetail::IEEEFloat(X.getSemantics()))

1527 return APFloat(scalbn(X.U.IEEE, Exp, RM), X.getSemantics());

1528 if (APFloat::usesLayoutdetail::DoubleAPFloat(X.getSemantics()))

1529 return APFloat(scalbn(X.U.Double, Exp, RM), X.getSemantics());

1531}

1532

1533

1534

1535

1536

1538 if (APFloat::usesLayoutdetail::IEEEFloat(X.getSemantics()))

1539 return APFloat(frexp(X.U.IEEE, Exp, RM), X.getSemantics());

1540 if (APFloat::usesLayoutdetail::DoubleAPFloat(X.getSemantics()))

1541 return APFloat(frexp(X.U.Double, Exp, RM), X.getSemantics());

1543}

1544

1546 X.clearSign();

1547 return X;

1548}

1549

1550

1552 X.changeSign();

1553 return X;

1554}

1555

1556

1557

1558

1559

1562 if (A.isSignaling())

1563 return A.makeQuiet();

1564 if (B.isSignaling())

1565 return B.makeQuiet();

1566 if (A.isNaN())

1567 return B;

1568 if (B.isNaN())

1569 return A;

1570 if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative()))

1571 return A.isNegative() ? A : B;

1572 return B < A ? B : A;

1573}

1574

1575

1576

1577

1578

1581 if (A.isSignaling())

1582 return A.makeQuiet();

1583 if (B.isSignaling())

1584 return B.makeQuiet();

1585 if (A.isNaN())

1586 return B;

1587 if (B.isNaN())

1588 return A;

1589 if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative()))

1590 return A.isNegative() ? B : A;

1591 return A < B ? B : A;

1592}

1593

1594

1595

1596

1599 if (A.isNaN())

1600 return A.makeQuiet();

1601 if (B.isNaN())

1602 return B.makeQuiet();

1603 if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative()))

1604 return A.isNegative() ? A : B;

1605 return B < A ? B : A;

1606}

1607

1608

1609

1612 if (A.isNaN())

1613 return B.isNaN() ? B.makeQuiet() : B;

1614 if (B.isNaN())

1615 return A;

1616 if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative()))

1617 return A.isNegative() ? A : B;

1618 return B < A ? B : A;

1619}

1620

1621

1622

1623

1626 if (A.isNaN())

1627 return A.makeQuiet();

1628 if (B.isNaN())

1629 return B.makeQuiet();

1630 if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative()))

1631 return A.isNegative() ? B : A;

1632 return A < B ? B : A;

1633}

1634

1635

1636

1639 if (A.isNaN())

1640 return B.isNaN() ? B.makeQuiet() : B;

1641 if (B.isNaN())

1642 return A;

1643 if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative()))

1644 return A.isNegative() ? B : A;

1645 return A < B ? B : A;

1646}

1647

1649 V.print(OS);

1650 return OS;

1651}

1652

1653

1654

1655

1656

1658

1660 if (this != &RHS) {

1663 }

1664 return *this;

1665}

1666

1671

1673

1674}

1675

1676}

1677

1678#undef APFLOAT_DISPATCH_ON_SEMANTICS

1679#endif

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

#define APFLOAT_DISPATCH_ON_SEMANTICS(METHOD_CALL)

Definition APFloat.h:26

This file implements a class to represent arbitrary precision integral constant values and operations...

static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")

static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")

#define LLVM_DUMP_METHOD

Mark debug helper function definitions like dump() that should not be stripped from debug builds.

Utilities for dealing with flags related to floating point properties and mode controls.

static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")

static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, const llvm::StringTable &StandardNames, VectorLibrary VecLib)

Initialize the set of available library functions based on the specified target triple.

The Input class is used to parse a yaml document into in-memory structs and vectors.

static const fltSemantics & IEEEsingle()

Definition APFloat.h:296

static const fltSemantics & Float8E4M3FN()

Definition APFloat.h:306

static LLVM_ABI const llvm::fltSemantics & EnumToSemantics(Semantics S)

static LLVM_ABI bool semanticsHasInf(const fltSemantics &)

cmpResult

IEEE-754R 5.11: Floating Point Comparison Relations.

Definition APFloat.h:334

@ cmpUnordered

Definition APFloat.h:338

@ cmpLessThan

Definition APFloat.h:335

@ cmpEqual

Definition APFloat.h:336

@ cmpGreaterThan

Definition APFloat.h:337

static constexpr roundingMode rmTowardZero

Definition APFloat.h:348

static LLVM_ABI ExponentType semanticsMinExponent(const fltSemantics &)

llvm::RoundingMode roundingMode

IEEE-754R 4.3: Rounding-direction attributes.

Definition APFloat.h:342

static const fltSemantics & BFloat()

Definition APFloat.h:295

static const fltSemantics & IEEEquad()

Definition APFloat.h:298

static LLVM_ABI unsigned int semanticsSizeInBits(const fltSemantics &)

static const fltSemantics & Float8E8M0FNU()

Definition APFloat.h:313

static LLVM_ABI bool semanticsHasSignedRepr(const fltSemantics &)

static const fltSemantics & IEEEdouble()

Definition APFloat.h:297

static LLVM_ABI unsigned getSizeInBits(const fltSemantics &Sem)

Returns the size of the floating point number (in bits) in the given semantics.

static const fltSemantics & x87DoubleExtended()

Definition APFloat.h:317

static constexpr roundingMode rmTowardNegative

Definition APFloat.h:347

uninitializedTag

Convenience enum used to construct an uninitialized APFloat.

Definition APFloat.h:378

@ uninitialized

Definition APFloat.h:379

static constexpr roundingMode rmNearestTiesToEven

Definition APFloat.h:344

static LLVM_ABI bool hasSignBitInMSB(const fltSemantics &)

static LLVM_ABI ExponentType semanticsMaxExponent(const fltSemantics &)

friend class APFloat

Definition APFloat.h:291

static const fltSemantics & Bogus()

A Pseudo fltsemantic used to construct APFloats that cannot conflict with anything real.

Definition APFloat.h:323

static LLVM_ABI unsigned int semanticsPrecision(const fltSemantics &)

static LLVM_ABI bool semanticsHasNaN(const fltSemantics &)

static LLVM_ABI Semantics SemanticsToEnum(const llvm::fltSemantics &Sem)

int32_t ExponentType

A signed type to represent a floating point numbers unbiased exponent.

Definition APFloat.h:155

static constexpr unsigned integerPartWidth

Definition APFloat.h:152

static const fltSemantics & PPCDoubleDoubleLegacy()

Definition APFloat.h:300

APInt::WordType integerPart

Definition APFloat.h:151

static LLVM_ABI bool semanticsHasZero(const fltSemantics &)

static LLVM_ABI bool isRepresentableAsNormalIn(const fltSemantics &Src, const fltSemantics &Dst)

static const fltSemantics & Float8E5M2FNUZ()

Definition APFloat.h:304

static const fltSemantics & Float8E4M3FNUZ()

Definition APFloat.h:307

static constexpr roundingMode rmTowardPositive

Definition APFloat.h:346

static const fltSemantics & IEEEhalf()

Definition APFloat.h:294

static const fltSemantics & Float4E2M1FN()

Definition APFloat.h:316

static const fltSemantics & Float6E2M3FN()

Definition APFloat.h:315

IlogbErrorKinds

Enumeration of ilogb error results.

Definition APFloat.h:383

@ IEK_NaN

Definition APFloat.h:385

@ IEK_Inf

Definition APFloat.h:386

@ IEK_Zero

Definition APFloat.h:384

static const fltSemantics & Float8E4M3()

Definition APFloat.h:305

static const fltSemantics & Float8E4M3B11FNUZ()

Definition APFloat.h:308

static LLVM_ABI bool isRepresentableBy(const fltSemantics &A, const fltSemantics &B)

static const fltSemantics & Float8E3M4()

Definition APFloat.h:311

static LLVM_ABI bool isIEEELikeFP(const fltSemantics &)

static const fltSemantics & Float8E5M2()

Definition APFloat.h:303

fltCategory

Category of internally-represented number.

Definition APFloat.h:370

@ fcZero

Definition APFloat.h:374

@ fcNaN

Definition APFloat.h:372

@ fcInfinity

Definition APFloat.h:371

@ fcNormal

Definition APFloat.h:373

static constexpr roundingMode rmNearestTiesToAway

Definition APFloat.h:349

static const fltSemantics & PPCDoubleDouble()

Definition APFloat.h:299

Semantics

Definition APFloat.h:159

@ S_MaxSemantics

Definition APFloat.h:260

@ S_Float6E2M3FN

Definition APFloat.h:253

@ S_IEEEsingle

Definition APFloat.h:162

@ S_Float8E4M3FNUZ

Definition APFloat.h:224

@ S_IEEEhalf

Definition APFloat.h:160

@ S_BFloat

Definition APFloat.h:161

@ S_Float8E5M2

Definition APFloat.h:202

@ S_PPCDoubleDouble

Definition APFloat.h:174

@ S_Float8E4M3

Definition APFloat.h:212

@ S_Float4E2M1FN

Definition APFloat.h:257

@ S_IEEEquad

Definition APFloat.h:164

@ S_Float6E3M2FN

Definition APFloat.h:249

@ S_Float8E4M3FN

Definition APFloat.h:217

@ S_FloatTF32

Definition APFloat.h:238

@ S_x87DoubleExtended

Definition APFloat.h:259

@ S_Float8E5M2FNUZ

Definition APFloat.h:209

@ S_Float8E4M3B11FNUZ

Definition APFloat.h:231

@ S_Float8E3M4

Definition APFloat.h:234

@ S_IEEEdouble

Definition APFloat.h:163

@ S_PPCDoubleDoubleLegacy

Definition APFloat.h:199

@ S_Float8E8M0FNU

Definition APFloat.h:245

static const fltSemantics & Float6E3M2FN()

Definition APFloat.h:314

opStatus

IEEE-754R 7: Default exception handling.

Definition APFloat.h:360

@ opOverflow

Definition APFloat.h:364

@ opUnderflow

Definition APFloat.h:365

@ opOK

Definition APFloat.h:361

@ opInexact

Definition APFloat.h:366

@ opInvalidOp

Definition APFloat.h:362

@ opDivByZero

Definition APFloat.h:363

static const fltSemantics & FloatTF32()

Definition APFloat.h:312

static LLVM_ABI unsigned int semanticsIntSizeInBits(const fltSemantics &, bool)

static APFloat getQNaN(const fltSemantics &Sem, bool Negative=false, const APInt *payload=nullptr)

Factory for QNaN values.

Definition APFloat.h:1102

static APFloat getSNaN(const fltSemantics &Sem, bool Negative=false, const APInt *payload=nullptr)

Factory for SNaN values.

Definition APFloat.h:1110

opStatus divide(const APFloat &RHS, roundingMode RM)

Definition APFloat.h:1190

APFloat & operator=(APFloat &&RHS)=default

bool isFiniteNonZero() const

Definition APFloat.h:1441

APFloat(const APFloat &RHS)=default

void copySign(const APFloat &RHS)

Definition APFloat.h:1284

LLVM_ABI opStatus convert(const fltSemantics &ToSemantics, roundingMode RM, bool *losesInfo)

LLVM_READONLY int getExactLog2Abs() const

Definition APFloat.h:1479

opStatus subtract(const APFloat &RHS, roundingMode RM)

Definition APFloat.h:1172

bool bitwiseIsEqual(const APFloat &RHS) const

Definition APFloat.h:1396

bool isNegative() const

Definition APFloat.h:1431

LLVM_ABI bool getExactInverse(APFloat *Inv) const

If this value is normal and has an exact, normal, multiplicative inverse, store it in inv and return ...

APFloat operator+(const APFloat &RHS) const

Add two APFloats, rounding ties to the nearest even.

Definition APFloat.h:1249

friend DoubleAPFloat

Definition APFloat.h:1495

LLVM_ABI double convertToDouble() const

Converts this APFloat to host double value.

bool isPosInfinity() const

Definition APFloat.h:1444

APFloat(APFloat &&RHS)=default

void toString(SmallVectorImpl< char > &Str, unsigned FormatPrecision=0, unsigned FormatMaxPadding=3, bool TruncateZero=true) const

Definition APFloat.h:1460

bool isNormal() const

Definition APFloat.h:1435

bool isDenormal() const

Definition APFloat.h:1432

bool isExactlyValue(double V) const

We don't rely on operator== working on double values, as it returns true for things that are clearly ...

Definition APFloat.h:1414

opStatus add(const APFloat &RHS, roundingMode RM)

Definition APFloat.h:1163

LLVM_READONLY int getExactLog2() const

Definition APFloat.h:1486

APFloat(double d)

Definition APFloat.h:1049

APFloat & operator=(const APFloat &RHS)=default

static LLVM_ABI APFloat getAllOnesValue(const fltSemantics &Semantics)

Returns a float which is bitcasted from an all one value int.

LLVM_ABI friend hash_code hash_value(const APFloat &Arg)

See friend declarations above.

APFloat(const fltSemantics &Semantics, integerPart I)

Definition APFloat.h:1041

bool operator!=(const APFloat &RHS) const

Definition APFloat.h:1364

APFloat(const fltSemantics &Semantics, T V)=delete

const fltSemantics & getSemantics() const

Definition APFloat.h:1439

APFloat operator-(const APFloat &RHS) const

Subtract two APFloats, rounding ties to the nearest even.

Definition APFloat.h:1257

APFloat operator*(const APFloat &RHS) const

Multiply two APFloats, rounding ties to the nearest even.

Definition APFloat.h:1265

APFloat(const fltSemantics &Semantics)

Definition APFloat.h:1039

bool isNonZero() const

Definition APFloat.h:1440

void clearSign()

Definition APFloat.h:1280

bool operator<(const APFloat &RHS) const

Definition APFloat.h:1366

bool isFinite() const

Definition APFloat.h:1436

APFloat makeQuiet() const

Assuming this is an IEEE-754 NaN value, quiet its signaling bit.

Definition APFloat.h:1298

bool isNaN() const

Definition APFloat.h:1429

opStatus convertFromAPInt(const APInt &Input, bool IsSigned, roundingMode RM)

Definition APFloat.h:1329

static APFloat getOne(const fltSemantics &Sem, bool Negative=false)

Factory for Positive and Negative One.

Definition APFloat.h:1070

unsigned int convertToHexString(char *DST, unsigned int HexDigits, bool UpperCase, roundingMode RM) const

Definition APFloat.h:1421

opStatus multiply(const APFloat &RHS, roundingMode RM)

Definition APFloat.h:1181

LLVM_ABI float convertToFloat() const

Converts this APFloat to host float value.

bool isSignaling() const

Definition APFloat.h:1433

bool operator>(const APFloat &RHS) const

Definition APFloat.h:1370

opStatus fusedMultiplyAdd(const APFloat &Multiplicand, const APFloat &Addend, roundingMode RM)

Definition APFloat.h:1217

APFloat operator/(const APFloat &RHS) const

Divide the first APFloat by the second, rounding ties to the nearest even.

Definition APFloat.h:1273

opStatus remainder(const APFloat &RHS)

Definition APFloat.h:1199

APFloat operator-() const

Negate an APFloat.

Definition APFloat.h:1241

bool isZero() const

Definition APFloat.h:1427

static APFloat getSmallestNormalized(const fltSemantics &Sem, bool Negative=false)

Returns the smallest (by magnitude) normalized finite number in the given semantics.

Definition APFloat.h:1140

APInt bitcastToAPInt() const

Definition APFloat.h:1335

bool isLargest() const

Definition APFloat.h:1447

friend APFloat frexp(const APFloat &X, int &Exp, roundingMode RM)

bool isSmallest() const

Definition APFloat.h:1446

static APFloat getLargest(const fltSemantics &Sem, bool Negative=false)

Returns the largest finite number in the given semantics.

Definition APFloat.h:1120

opStatus convertToInteger(MutableArrayRef< integerPart > Input, unsigned int Width, bool IsSigned, roundingMode RM, bool *IsExact) const

Definition APFloat.h:1314

opStatus next(bool nextDown)

Definition APFloat.h:1236

static APFloat getInf(const fltSemantics &Sem, bool Negative=false)

Factory for Positive and Negative Infinity.

Definition APFloat.h:1080

friend APFloat scalbn(APFloat X, int Exp, roundingMode RM)

bool operator>=(const APFloat &RHS) const

Definition APFloat.h:1379

bool needsCleanup() const

Definition APFloat.h:1056

static APFloat getSmallest(const fltSemantics &Sem, bool Negative=false)

Returns the smallest (by magnitude) finite number in the given semantics.

Definition APFloat.h:1130

LLVM_ABI FPClassTest classify() const

Return the FPClassTest which will return true for the value.

bool operator==(const APFloat &RHS) const

Definition APFloat.h:1362

opStatus mod(const APFloat &RHS)

Definition APFloat.h:1208

bool isPosZero() const

Definition APFloat.h:1442

friend int ilogb(const APFloat &Arg)

Returns the exponent of the internal representation of the APFloat.

Definition APFloat.h:1516

LLVM_ABI Expected< opStatus > convertFromString(StringRef, roundingMode)

fltCategory getCategory() const

Definition APFloat.h:1438

APFloat(const fltSemantics &Semantics, uninitializedTag)

Definition APFloat.h:1046

bool isInteger() const

Definition APFloat.h:1448

bool isNegInfinity() const

Definition APFloat.h:1445

friend IEEEFloat

Definition APFloat.h:1494

LLVM_DUMP_METHOD void dump() const

bool isNegZero() const

Definition APFloat.h:1443

LLVM_ABI void print(raw_ostream &) const

static APFloat copySign(APFloat Value, const APFloat &Sign)

A static helper to produce a copy of an APFloat value with its sign copied from some other APFloat.

Definition APFloat.h:1291

APFloat(float f)

Definition APFloat.h:1050

opStatus roundToIntegral(roundingMode RM)

Definition APFloat.h:1230

void changeSign()

Definition APFloat.h:1279

static APFloat getNaN(const fltSemantics &Sem, bool Negative=false, uint64_t payload=0)

Factory for NaN values.

Definition APFloat.h:1091

static bool hasSignificand(const fltSemantics &Sem)

Returns true if the given semantics has actual significand.

Definition APFloat.h:1155

static APFloat getZero(const fltSemantics &Sem, bool Negative=false)

Factory for Positive and Negative Zero.

Definition APFloat.h:1061

cmpResult compare(const APFloat &RHS) const

Definition APFloat.h:1386

bool isSmallestNormalized() const

Definition APFloat.h:1450

APFloat(const fltSemantics &Semantics, const APInt &I)

Definition APFloat.h:1048

bool isInfinity() const

Definition APFloat.h:1428

bool operator<=(const APFloat &RHS) const

Definition APFloat.h:1374

Class for arbitrary precision integers.

static constexpr unsigned APINT_BITS_PER_WORD

Bits in a word.

An arbitrary precision integer that knows its signedness.

Tagged union holding either a T or a Error.

FoldingSetNodeID - This class is used to gather all the unique data bits of a node.

MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

StringRef - Represent a constant reference to a string, i.e.

LLVM Value Representation.

LLVM_ABI void makeSmallestNormalized(bool Neg)

LLVM_ABI DoubleAPFloat & operator=(const DoubleAPFloat &RHS)

LLVM_ABI void changeSign()

APFloat & getFirst()

Definition APFloat.h:1667

LLVM_ABI bool isLargest() const

LLVM_ABI opStatus remainder(const DoubleAPFloat &RHS)

LLVM_ABI opStatus multiply(const DoubleAPFloat &RHS, roundingMode RM)

LLVM_ABI fltCategory getCategory() const

APFloat & getSecond()

Definition APFloat.h:1669

LLVM_ABI bool bitwiseIsEqual(const DoubleAPFloat &RHS) const

LLVM_ABI LLVM_READONLY int getExactLog2Abs() const

LLVM_ABI opStatus convertFromAPInt(const APInt &Input, bool IsSigned, roundingMode RM)

LLVM_ABI APInt bitcastToAPInt() const

LLVM_ABI Expected< opStatus > convertFromString(StringRef, roundingMode)

LLVM_ABI bool isSmallest() const

LLVM_ABI opStatus subtract(const DoubleAPFloat &RHS, roundingMode RM)

LLVM_ABI friend hash_code hash_value(const DoubleAPFloat &Arg)

LLVM_ABI cmpResult compareAbsoluteValue(const DoubleAPFloat &RHS) const

LLVM_ABI bool isDenormal() const

LLVM_ABI opStatus convertToInteger(MutableArrayRef< integerPart > Input, unsigned int Width, bool IsSigned, roundingMode RM, bool *IsExact) const

LLVM_ABI void makeSmallest(bool Neg)

LLVM_ABI friend int ilogb(const DoubleAPFloat &X)

LLVM_ABI opStatus next(bool nextDown)

LLVM_ABI void makeInf(bool Neg)

LLVM_ABI bool isInteger() const

LLVM_ABI void makeZero(bool Neg)

LLVM_ABI opStatus divide(const DoubleAPFloat &RHS, roundingMode RM)

LLVM_ABI bool isSmallestNormalized() const

LLVM_ABI opStatus mod(const DoubleAPFloat &RHS)

LLVM_ABI DoubleAPFloat(const fltSemantics &S)

LLVM_ABI void toString(SmallVectorImpl< char > &Str, unsigned FormatPrecision, unsigned FormatMaxPadding, bool TruncateZero=true) const

LLVM_ABI void makeLargest(bool Neg)

LLVM_ABI cmpResult compare(const DoubleAPFloat &RHS) const

LLVM_ABI friend DoubleAPFloat scalbn(const DoubleAPFloat &X, int Exp, roundingMode)

LLVM_ABI opStatus roundToIntegral(roundingMode RM)

LLVM_ABI opStatus fusedMultiplyAdd(const DoubleAPFloat &Multiplicand, const DoubleAPFloat &Addend, roundingMode RM)

LLVM_ABI unsigned int convertToHexString(char *DST, unsigned int HexDigits, bool UpperCase, roundingMode RM) const

bool needsCleanup() const

Definition APFloat.h:866

LLVM_ABI bool isNegative() const

LLVM_ABI opStatus add(const DoubleAPFloat &RHS, roundingMode RM)

~DoubleAPFloat()

Definition APFloat.h:1672

LLVM_ABI friend DoubleAPFloat frexp(const DoubleAPFloat &X, int &Exp, roundingMode)

LLVM_ABI void makeNaN(bool SNaN, bool Neg, const APInt *fill)

LLVM_ABI unsigned int convertToHexString(char *dst, unsigned int hexDigits, bool upperCase, roundingMode) const

Write out a hexadecimal representation of the floating point value to DST, which must be of sufficien...

LLVM_ABI cmpResult compareAbsoluteValue(const IEEEFloat &) const

LLVM_ABI opStatus mod(const IEEEFloat &)

C fmod, or llvm frem.

fltCategory getCategory() const

Definition APFloat.h:573

LLVM_ABI opStatus convertFromAPInt(const APInt &, bool, roundingMode)

bool isNonZero() const

Definition APFloat.h:575

bool isFiniteNonZero() const

Definition APFloat.h:576

bool needsCleanup() const

Returns whether this instance allocated memory.

Definition APFloat.h:463

LLVM_ABI void makeLargest(bool Neg=false)

Make this number the largest magnitude normal number in the given semantics.

LLVM_ABI LLVM_READONLY int getExactLog2Abs() const

LLVM_ABI APInt bitcastToAPInt() const

LLVM_ABI friend IEEEFloat scalbn(IEEEFloat X, int Exp, roundingMode)

LLVM_ABI cmpResult compare(const IEEEFloat &) const

IEEE comparison with another floating point number (NaNs compare unordered, 0==-0).

bool isNegative() const

IEEE-754R isSignMinus: Returns true if and only if the current value is negative.

Definition APFloat.h:538

LLVM_ABI opStatus divide(const IEEEFloat &, roundingMode)

LLVM_ABI friend hash_code hash_value(const IEEEFloat &Arg)

Overload to compute a hash code for an APFloat value.

bool isNaN() const

Returns true if and only if the float is a quiet or signaling NaN.

Definition APFloat.h:563

LLVM_ABI opStatus remainder(const IEEEFloat &)

IEEE remainder.

LLVM_ABI double convertToDouble() const

LLVM_ABI float convertToFloat() const

LLVM_ABI opStatus subtract(const IEEEFloat &, roundingMode)

LLVM_ABI void toString(SmallVectorImpl< char > &Str, unsigned FormatPrecision=0, unsigned FormatMaxPadding=3, bool TruncateZero=true) const

Converts this value into a decimal string.

LLVM_ABI void makeSmallest(bool Neg=false)

Make this number the smallest magnitude denormal number in the given semantics.

LLVM_ABI void makeInf(bool Neg=false)

bool isNormal() const

IEEE-754R isNormal: Returns true if and only if the current value is normal.

Definition APFloat.h:544

LLVM_ABI bool isSmallestNormalized() const

Returns true if this is the smallest (by magnitude) normalized finite number in the given semantics.

friend class IEEEFloatUnitTestHelper

Definition APFloat.h:816

LLVM_ABI void makeQuiet()

LLVM_ABI bool isLargest() const

Returns true if and only if the number has the largest possible finite magnitude in the current seman...

LLVM_ABI opStatus add(const IEEEFloat &, roundingMode)

bool isFinite() const

Returns true if and only if the current value is zero, subnormal, or normal.

Definition APFloat.h:550

LLVM_ABI Expected< opStatus > convertFromString(StringRef, roundingMode)

LLVM_ABI void makeNaN(bool SNaN=false, bool Neg=false, const APInt *fill=nullptr)

LLVM_ABI opStatus multiply(const IEEEFloat &, roundingMode)

LLVM_ABI opStatus roundToIntegral(roundingMode)

LLVM_ABI IEEEFloat & operator=(const IEEEFloat &)

LLVM_ABI bool bitwiseIsEqual(const IEEEFloat &) const

Bitwise comparison for equality (QNaNs compare equal, 0!=-0).

LLVM_ABI void makeSmallestNormalized(bool Negative=false)

Returns the smallest (by magnitude) normalized finite number in the given semantics.

LLVM_ABI bool isInteger() const

Returns true if and only if the number is an exact integer.

bool isPosZero() const

Definition APFloat.h:577

LLVM_ABI IEEEFloat(const fltSemantics &)

LLVM_ABI opStatus fusedMultiplyAdd(const IEEEFloat &, const IEEEFloat &, roundingMode)

LLVM_ABI friend int ilogb(const IEEEFloat &Arg)

LLVM_ABI opStatus next(bool nextDown)

IEEE-754R 5.3.1: nextUp/nextDown.

bool isInfinity() const

IEEE-754R isInfinite(): Returns true if and only if the float is infinity.

Definition APFloat.h:560

const fltSemantics & getSemantics() const

Definition APFloat.h:574

bool isZero() const

Returns true if and only if the float is plus or minus zero.

Definition APFloat.h:553

LLVM_ABI bool isSignaling() const

Returns true if and only if the float is a signaling NaN.

bool operator==(const IEEEFloat &) const =delete

The definition of equality is not straightforward for floating point, so we won't use operator==.

LLVM_ABI void makeZero(bool Neg=false)

LLVM_ABI opStatus convert(const fltSemantics &, roundingMode, bool *)

IEEEFloat::convert - convert a value of one floating point type to another.

LLVM_ABI void changeSign()

LLVM_ABI bool isDenormal() const

IEEE-754R isSubnormal(): Returns true if and only if the float is a denormal.

LLVM_ABI opStatus convertToInteger(MutableArrayRef< integerPart >, unsigned int, bool, roundingMode, bool *) const

LLVM_ABI friend IEEEFloat frexp(const IEEEFloat &X, int &Exp, roundingMode)

LLVM_ABI bool isSmallest() const

Returns true if and only if the number has the smallest possible non-zero magnitude in the current se...

bool isNegZero() const

Definition APFloat.h:578

An opaque object representing a hash code.

This class implements an extremely fast bulk output stream that can only output to a stream.

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

static constexpr opStatus opInexact

Definition APFloat.h:439

static constexpr fltCategory fcNaN

Definition APFloat.h:441

static constexpr opStatus opDivByZero

Definition APFloat.h:436

static constexpr opStatus opOverflow

Definition APFloat.h:437

static constexpr cmpResult cmpLessThan

Definition APFloat.h:431

static constexpr roundingMode rmTowardPositive

Definition APFloat.h:427

static constexpr uninitializedTag uninitialized

Definition APFloat.h:421

static constexpr fltCategory fcZero

Definition APFloat.h:443

static constexpr opStatus opOK

Definition APFloat.h:434

static constexpr cmpResult cmpGreaterThan

Definition APFloat.h:432

static constexpr unsigned integerPartWidth

Definition APFloat.h:429

LLVM_ABI hash_code hash_value(const IEEEFloat &Arg)

APFloatBase::ExponentType ExponentType

Definition APFloat.h:420

APFloatBase::fltCategory fltCategory

Definition APFloat.h:419

static constexpr fltCategory fcNormal

Definition APFloat.h:442

static constexpr opStatus opInvalidOp

Definition APFloat.h:435

APFloatBase::opStatus opStatus

Definition APFloat.h:417

LLVM_ABI IEEEFloat frexp(const IEEEFloat &Val, int &Exp, roundingMode RM)

APFloatBase::uninitializedTag uninitializedTag

Definition APFloat.h:415

static constexpr cmpResult cmpUnordered

Definition APFloat.h:433

static constexpr roundingMode rmTowardNegative

Definition APFloat.h:426

APFloatBase::roundingMode roundingMode

Definition APFloat.h:416

APFloatBase::cmpResult cmpResult

Definition APFloat.h:418

static constexpr fltCategory fcInfinity

Definition APFloat.h:440

static constexpr roundingMode rmNearestTiesToAway

Definition APFloat.h:424

static constexpr roundingMode rmTowardZero

Definition APFloat.h:428

static constexpr opStatus opUnderflow

Definition APFloat.h:438

static constexpr roundingMode rmNearestTiesToEven

Definition APFloat.h:422

LLVM_ABI int ilogb(const IEEEFloat &Arg)

static constexpr cmpResult cmpEqual

Definition APFloat.h:430

LLVM_ABI IEEEFloat scalbn(IEEEFloat X, int Exp, roundingMode)

APFloatBase::integerPart integerPart

Definition APFloat.h:414

This is an optimization pass for GlobalISel generic memory operations.

void fill(R &&Range, T &&Value)

Provide wrappers to std::fill which take ranges instead of having to pass begin/end explicitly.

hash_code hash_value(const FixedPointSemantics &Val)

static constexpr APFloatBase::ExponentType exponentZero(const fltSemantics &semantics)

APFloat abs(APFloat X)

Returns the absolute value of the argument.

Definition APFloat.h:1545

LLVM_READONLY APFloat maximum(const APFloat &A, const APFloat &B)

Implements IEEE 754-2019 maximum semantics.

Definition APFloat.h:1625

int ilogb(const APFloat &Arg)

Returns the exponent of the internal representation of the APFloat.

Definition APFloat.h:1516

APFloat frexp(const APFloat &X, int &Exp, APFloat::roundingMode RM)

Equivalent of C standard library function.

Definition APFloat.h:1537

LLVM_READONLY APFloat maxnum(const APFloat &A, const APFloat &B)

Implements IEEE-754 2008 maxNum semantics.

Definition APFloat.h:1580

lostFraction

Enum that represents what fraction of the LSB truncated bits of an fp number represent.

Definition APFloat.h:50

@ lfMoreThanHalf

Definition APFloat.h:54

@ lfLessThanHalf

Definition APFloat.h:52

@ lfExactlyHalf

Definition APFloat.h:53

@ lfExactlyZero

Definition APFloat.h:51

LLVM_READONLY APFloat minimumnum(const APFloat &A, const APFloat &B)

Implements IEEE 754-2019 minimumNumber semantics.

Definition APFloat.h:1611

FPClassTest

Floating-point class tests, supported by 'is_fpclass' intrinsic.

APFloat scalbn(APFloat X, int Exp, APFloat::roundingMode RM)

Returns: X * 2^Exp for integral exponents.

Definition APFloat.h:1525

static constexpr APFloatBase::ExponentType exponentNaN(const fltSemantics &semantics)

@ First

Helpers to iterate all locations in the MemoryEffectsBase class.

LLVM_READONLY APFloat minnum(const APFloat &A, const APFloat &B)

Implements IEEE-754 2008 minNum semantics.

Definition APFloat.h:1561

RoundingMode

Rounding mode.

@ TowardZero

roundTowardZero.

@ NearestTiesToEven

roundTiesToEven.

@ TowardPositive

roundTowardPositive.

@ NearestTiesToAway

roundTiesToAway.

@ TowardNegative

roundTowardNegative.

raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)

static constexpr APFloatBase::ExponentType exponentInf(const fltSemantics &semantics)

APFloat neg(APFloat X)

Returns the negated value of the argument.

Definition APFloat.h:1551

LLVM_READONLY APFloat minimum(const APFloat &A, const APFloat &B)

Implements IEEE 754-2019 minimum semantics.

Definition APFloat.h:1598

LLVM_READONLY APFloat maximumnum(const APFloat &A, const APFloat &B)

Implements IEEE 754-2019 maximumNumber semantics.

Definition APFloat.h:1638