TI's slide deck on ADC DC specifications (https://training.ti.com/ti-precision-labs-adcs-dc-spec) disagrees with Maxim's app note on INL/DNL (https://www.maximintegrated.com/en/design/technical-documents/tutorials/2/283.html) on how to calculate DNL.
TI says that the \$k\$th code's DNL is $$DNL[k] = \frac{W[k] - Q}{Q},$$ where \$W[k]\$ is the width of the \$k\$th code and \$Q\$ is the ideal code width (i.e. 1 LSB).
Maxim says that $$DNL = |(V_{D+1} - V_D) / V_{LSB-IDEAL} -1|,$$ where \$V_D\$ is the "physical value corresponding to the digital output code D." I understand that to mean the physical value corresponding to the center of code D, since the other values corresponding to the code are represented by quantization error which is modeled as additive white noise and ignored in the analysis of DNL. I think Maxim's equation describes how the distance between the centers of adjacent codes (in LSBs) deviates from 1 LSB. I think the absolute value is wrong, because the deviation can be positive or negative.
To compare Maxim's equation to TI's, it has to be rewritten in terms of code widths. With assistance from the figure below the equation is $$\left(\frac{W[D]}{2} + \frac{W[D+1]}{2} - Q\right)/Q.$$
These two equations do not give the same results for DNL and INL, as shown in the example below. I changed the indices of the Maxim equation a little in my example, but I think it is still valid.
Who is right? I like Maxim's equation with my changed indices, because I can see the maximum INL of -1 as the difference between the ideal transfer function and the center of code 4, where the equation says it should be (the center of code 3 is also the maximum INL, but with zero width, the center is just the transition). I don't see where the maximum INL of -1.5 is according to TI's equation.