[PATCH] D29109: [APFloat] Fix comments. NFC.

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 16:10:19 PST 2017


jlebar added a comment.

lgtm!



================
Comment at: llvm/lib/Support/APFloat.cpp:70
+  /* The IBM double-double semantics. Such a number consists of a pair of IEEE
+     64-bit doubles (Hi, Lo), where |Hi| > |Lo|, and if normalized,
+     (double)(Hi + Lo) == Hi. The numeric value it's modeling is Hi + Lo.
----------------
I think "if normal" or "if not denormal" is what you want.  "if normalized" implies that you may be able to take *any* Hi/Lo and "normalize" them so that this criterion is true.  But that's not true for some values (namely, denormals).

Unless we use "normalized" elsewhere in apfloat, in which case, whatever.  :)


================
Comment at: llvm/lib/Support/APFloat.cpp:4341
          (Floats[0].isDenormal() || Floats[1].isDenormal() ||
+          // (double)(Hi + Lo) == Hi defines a normalized number.
           Floats[0].compare(Floats[0] + Floats[1]) != cmpEqual);
----------------
Again, perhaps "normal" or "non-denormal".


https://reviews.llvm.org/D29109





More information about the llvm-commits mailing list