The Gemara in Erubin discusses the length of the diagonal, or the hypotenuse, of a square. The context of the Gemara’s discussion is the distance of 2000 Amot (cubits) around a city as it applies to the laws of Shabbat, and the Gemara establishes that the diagonal of two perpendicular lines measuring 2000 Amot would be 2800, because the hypotenuse is 1 and 2/5th the length of the lines of the square.
The practical application of this principle would be the shape of the Tefillin. The Shulhan Aruch (Orah Haim 32) rules that the boxes of the Tefillin must be square, such that the diagonal must measure 1 and 2/5th the length and width of the box.
How precise must this measurement be? Must one scientifically measure the Tefillin box to ascertain that it is a perfect square, or does it suffice if it looks like a square?
In the book Orhot Rabbenu, which tells stories about the Hazon Ish (Rav Avraham Yeshaya Karelitz, 1878-1953), it is told that a person once brought his Tefillin to the Hazon Ish to determine whether they were valid. The Hazon Ish looked at the box and immediately said that the box is perfectly valid. The man noted that it had not been measured with a ruler, and the Hazon Ish replied, "These are the Tefillin that Moshe Rabbenu was talking about." As long as the box looks square to the naked eye, this suffices, and there is no need to have it measured scientifically. This is also the ruling of Rav Moshe Feinstein (1895-1986) in Iggerot Moshe (Y.D. 2:146), and also the position of Hacham Bension Abba Shaul (1923-1998), in Or Le’sion (vol. 2, Siman 44, note 3). It should also be noted that according to Tosafot, the Gemara’s calculation of 1 and 2/5th was meant only as an approximation, so there is certainly no need to make a scientific measurement. Of course, if the box does not look square, then it is invalid, but as long as the box appears square to the naked eye, the Tefillin are valid and may be used.
Summary: The boxes of the Tefillin must be perfectly square, but they do not need to be scientifically measured. As long as they appear square to the naked eye, they may be used.