Browse Source

avutil/softfloat: Add more tests for the normalization

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.7
Michael Niedermayer 10 years ago
parent
commit
904ea60afa
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      libavutil/softfloat.c

+ 10
- 0
libavutil/softfloat.c View File

@@ -93,6 +93,16 @@ int main(void){
sf3 = av_add_sf(sf3, sf2);
printf("test3 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf3), sf3.mant, sf3.exp);

sf1 = av_int2sf(0xFFFFFFF0, 0);
printf("test4 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp);
sf1 = av_int2sf(0x00000010, 0);
printf("test4 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp);

sf1 = av_int2sf(0x1FFFFFFF, 0);
printf("test4 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp);
sf1 = av_int2sf(0xE0000001, 0);
printf("test4 softfloat: %.10lf (0x%08x %d)\n", (double)av_sf2double(sf1), sf1.mant, sf1.exp);

return 0;

}

Loading…
Cancel
Save