Skip to content

Commit

Permalink
Update instructions.append.md for Triangle (#1933)
Browse files Browse the repository at this point in the history
  • Loading branch information
mckzm authored Jun 19, 2024
1 parent 0b8e194 commit 02bb602
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exercises/practice/triangle/.docs/instructions.append.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Or maybe you will come up with an approach that uses none of those!
## Non-integer lengths

The base exercise tests identification of triangles whose sides are all
integers. However, some triangles cannot be represented by pure integers. A simple example is a right triangle (an isosceles triangle whose equal sides are separated by 90 degrees) whose equal sides both have length of 1. Its hypotenuse is the square root of 2, which is an irrational number: no simple multiplication can represent this number as an integer.
integers. However, some triangles cannot be represented by pure integers. A simple example is a triangle with a 90 degree angle between two equal sides of length 1. Its third side has the length square root of 2, which is an irrational number. No integer can represent it.

It would be tedious to rewrite the analysis functions to handle both integer and floating-point cases, and particularly tedious to do so for all potential integer and floating point types: given signed and unsigned variants of bitwidths 8, 16, 32, 64, and 128, that would be 10 reimplementations of fundamentally the same code even before considering floats!

Expand Down

0 comments on commit 02bb602

Please sign in to comment.