print more fraction digits in report
This commit is contained in:
parent
94c22dd6f8
commit
c008374936
|
|
@ -24,6 +24,7 @@ Version NEXT
|
||||||
parsecheck: init all fields in testcase results
|
parsecheck: init all fields in testcase results
|
||||||
SConstruct: declare CPP constant SIZEOF_LONG
|
SConstruct: declare CPP constant SIZEOF_LONG
|
||||||
randomcheck: use SIZEOF_LONG for grabing highest bits from long()
|
randomcheck: use SIZEOF_LONG for grabing highest bits from long()
|
||||||
|
randomcheck: print more fraction digits in report
|
||||||
|
|
||||||
Version 2.8.1b29 - 24 Aug 2019
|
Version 2.8.1b29 - 24 Aug 2019
|
||||||
added scons command line argument without-fspscan=yes for building
|
added scons command line argument without-fspscan=yes for building
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ static void run_randomtest( unsigned short (*keygen)(void) )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_bitcount(void)
|
static float print_bitcount(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
float worst;
|
float worst;
|
||||||
|
|
@ -87,13 +87,16 @@ static void print_bitcount(void)
|
||||||
|
|
||||||
for(i=0;i<16;i++)
|
for(i=0;i<16;i++)
|
||||||
{
|
{
|
||||||
|
float delta;
|
||||||
ratio=(float)bitcount[i]/rounds;
|
ratio=(float)bitcount[i]/rounds;
|
||||||
if(fabs(ratio-0.5f)>worst)
|
delta = fabs(ratio-0.5f);
|
||||||
worst=fabs(ratio-0.5f);
|
if(delta > worst)
|
||||||
|
worst=delta;
|
||||||
printf("%.2f ", ratio);
|
printf("%.2f ", ratio);
|
||||||
}
|
}
|
||||||
printf(" Worst: %.3f\n", worst);
|
printf(" Worst: %.4f\n", worst);
|
||||||
if(worst>MAX_WORST_ALLOWED) result++;
|
if(worst>MAX_WORST_ALLOWED) result++;
|
||||||
|
return worst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user