Bug introduced in 8.0 or earlier and persisting through 11.0.1 or later
While answering another question I discovered that TriangleWave
does not automatically evaluate when given certain fractional values, specifically fractions with a denominator of 20:
TriangleWave[ Range[8] / 20 ]
{TriangleWave[1/20], 2/5, TriangleWave[3/20], 4/5, 1, 4/5, TriangleWave[7/20], 2/5}
These are reduced by Simplify
:
TriangleWave[ Range[8] / 20 ] // Simplify
{1/5, 2/5, 3/5, 4/5, 1, 4/5, 3/5, 2/5}
This appears to be the only denominator under 10,000 that does not automatically evaluate:
Cases[TriangleWave[1/Range[1*^5]], _TriangleWave]
{TriangleWave[1/20]}
Is there a reason to believe that this behavior is anything other than a bug in TriangleWave
?
(2 ArcSin[Sin[2 Pi t]])/Pi
is an explicitNumberQ
$\endgroup$TriangleWave[]
was introduced in version 7, testing that as well (by somebody other than you or me) should make for an accurate record. $\endgroup$