CLF code implementation

Nick, perhaps the wording could be clarified, but I don’t think those statements are contradictory. The first is good general advice to avoid producing Inf and NaN, since they may cause problems in downstream processes. (Note it says “should” and not “must.”)

The second statement is as much about the input as the output. In other words, the half-domain LUT has entries for the bit-patterns that represent the Infs and NaNs and therefore allows the LUT builder to map these input values to something else on output. For example, it’s possible to build a half-domain LUT that would flag Inf and NaN pixels in bright magenta as a diagnostic tool. In general, the LUT builder would map those input values to friendlier numbers on output, but they could be passed unchanged if needed for some special purpose.