Commit 596dfe7d authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/softfloat: Add tests for exponent underflows

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 046218b2
......@@ -97,6 +97,18 @@ int main(void){
sf1 = av_int2sf(0xE0000001, 0);
printf("test4 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp);
sf1 = (SoftFloat){ 0x20000000, MIN_EXP };
sf1 = av_mul_sf(sf1, sf1);
printf("test5 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp);
sf1 = (SoftFloat){ 0x20000000, MIN_EXP };
sf2 = (SoftFloat){ 0x20000000, MAX_EXP };
i = av_cmp_sf(sf1, sf2);
j = av_cmp_sf(sf2, sf1);
sf1 = av_div_sf(sf1, sf2);
printf("test6 softfloat: %.10lf (0x%08x %d) %d %d\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp, i, j);
for(i= 0; i<4*36; i++){
int s, c;
double errs, errc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment