mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
add regression test for ilog2 bug
Added regress test to verify the
[fix](33815f49e6
)
for
[issue #148](https://github.com/lcn2/calc/issues/148).
Sorry: We forgot to include this regression test to previous update.
This commit is contained in:
@@ -3030,6 +3030,24 @@ define test_2600()
|
|||||||
strcat(str(tnum++),
|
strcat(str(tnum++),
|
||||||
': round(log(1.2+1.2i,1e-10),10) == ',
|
': round(log(1.2+1.2i,1e-10),10) == ',
|
||||||
'0.2296962439+0.3410940885i'));
|
'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,
|
vrfy(log2(2) == 1,
|
||||||
strcat(str(tnum++), ': log2(2) == 1'));
|
strcat(str(tnum++), ': log2(2) == 1'));
|
||||||
vrfy(log2(4) == 2,
|
vrfy(log2(4) == 2,
|
||||||
|
Reference in New Issue
Block a user