Those dimensions come out to a 7.41 inch screen, which is the same result for my Kindle Fire. This is the actual diagonal length (or Hypotenuse) of the screen for a device given the parameters (1024 X 600 @ 160). This is what the formula in the code solves for.
Technically, I believe, Kindle Fire and other Tablets may not accurately reflect all of the parameters and, therefore, there is a skewed result when applying the formula.
My Kindle measures 7 inches diagonally (with a ruler) which leads me to believe that it is not truly 1024 X 600 @ 160 because these dimension actually measure to 7.41.
To answer your question, the formula is correct at 7.41. I think you should change the test threshold for determining a 10 inch Tablet, I initially used Result > 7.5 = 10 inch Tablet. I now use > 9 because I realize there are 8 inch etc tablets out there on the market that I would want to run in portrait also.