# Screen display ratios

So I was creating a script to determine the aspect ratio of screens based on resolution. Am I right in saying that 1366 pixels x 768 pixels is not in fact a true 16:9 ratio?

In this case I am stuck as to how to calculate the common ratio of computer displays.

I hope you can help and this is the correct place to ask - go easy on me, its my first time here! You can normally find me on stackoverflow :)

• The partial fraction expression of $\frac{1366}{768}$ is $[1, 1, 3, 1, 1, 13, 1, 2]$. So the sequence of "optimal" rational approximations would be $1, 2, \frac{7}{4}, \frac{9}{5}, \frac{16}{9}, \frac{217}{122}, \frac{233}{131}, \frac{683}{384}$. And the $\frac{16}{9}$ is especially good since that corresponds to cutting off just before the "large" entry 13. – Daniel Schepler Jul 10 '17 at 16:53

As $\frac{1366}{768} \approx 1.7786$, while $\frac{16}{9} = 1.777\dots$, your statement is correct. However, you can also see the discrepancy is rather small, and so $16:9$ gives a rather good impression of the ratio, which is why it is noted there in the first place. An exact $16 : 9$ ratio which would be close to yours could be $1360$ by $765$. (Again, it's pretty close to $1366$ by $786$.)

• Thanks very much, I feel this answered my question in the clearest and meaningful way. Chris. – Chris Jul 11 '17 at 12:59

$$\frac{1366}{768}=1.7786458\overline3$$ while $$\frac{16}9=1.\overline7.$$

there is a small discrepancy.

If you assume that the pixels are square, then it is true that a screen of 1366 pixels by 768 pixels is not exactly a 16:9 ratio. It's possible that when describing the aspect ratio of displays, the computer manufacturers round to a simple ratio. It's also possible that pixels are not square!

P.S. Could you describe what the "aspect ratio" and "resolution" of screens are precisely for those not fluent in such computer terms?

P.P.S. I'm not sure this question belongs on this site... is stackoverflow not suited for it either?

Let's see:

$$\frac{1366}{768}-\frac{16}{9}$$ $$=\frac{2\cdot 683}{2^8\cdot 3}-\frac{2^4}{3^2}$$ $$=\frac{683}{2^7\cdot 3}\cdot \frac33 - \frac{2^4}{3^2}\cdot\frac{2^7}{2^7}$$ $$=\frac{2049 - 2048}{2^7\cdot3^2}$$ $$=\frac1{1152}$$

So: no, but they only differ by $\frac1{1152}$.