Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
596dfe7d
Commit
596dfe7d
authored
Nov 08, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/softfloat: Add tests for exponent underflows
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
046218b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
softfloat.c
libavutil/softfloat.c
+12
-0
No files found.
libavutil/softfloat.c
View file @
596dfe7d
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment