Skip to content

Commit

Permalink
add regression test for ilog2 bug
Browse files Browse the repository at this point in the history
Added regress test to verify the
[fix](33815f4)
for
[issue #148](#148).

Sorry: We forgot to include this regression test to previous update.
  • Loading branch information
lcn2 committed Jun 1, 2024
1 parent a547c36 commit 7f72908
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cal/regress.cal
Original file line number Diff line number Diff line change
Expand Up @@ -3030,6 +3030,24 @@ define test_2600()
strcat(str(tnum++),
': round(log(1.2+1.2i,1e-10),10) == ',
'0.2296962439+0.3410940885i'));
vrfy(log2(0.5) == -1,
strcat(str(tnum++), ': log2(0.5) == -1'));
vrfy(log2(0.5) == -1,
strcat(str(tnum++), ': log2(0.5) == -1'));
vrfy(log2(0.5) == log2(0.5),
strcat(str(tnum++), ': log2(0.5) == log2(0.5)'));
vrfy(0^0 == 1,
strcat(str(tnum++), ': 0^0 == 1'));
vrfy(1^0 == 1,
strcat(str(tnum++), ': 1^0 == 1'));
vrfy(1^1 == 1,
strcat(str(tnum++), ': 1^1 == 1'));
vrfy(2^0 == 1,
strcat(str(tnum++), ': 2^0 == 1'));
vrfy(log2(1) == 0,
strcat(str(tnum++), ': log2(1) == 0'));
vrfy(log2(1.0) == 0,
strcat(str(tnum++), ': log2(1.0) == 0'));
vrfy(log2(2) == 1,
strcat(str(tnum++), ': log2(2) == 1'));
vrfy(log2(4) == 2,
Expand Down

0 comments on commit 7f72908

Please sign in to comment.