Skip to content

Commit

Permalink
triangle: update instructions append (#1934)
Browse files Browse the repository at this point in the history
  • Loading branch information
senekor authored Jun 22, 2024
1 parent 02bb602 commit a7e7b35
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 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.
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 (meaning it cannot be written as an integer or a fraction).

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 a7e7b35

Please sign in to comment.