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
e1713097
Commit
e1713097
authored
Jul 25, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/softfloat: Add a test for av_sincos_sf()
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
fb57bc6c
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 @
e1713097
...
...
@@ -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
);
for
(
i
=
0
;
i
<
4
*
36
;
i
++
){
int
s
,
c
;
double
errs
,
errc
;
av_sincos_sf
(
i
*
(
1ULL
<<
32
)
/
36
/
4
,
&
s
,
&
c
);
errs
=
(
double
)
s
/
(
1
<<
30
)
-
sin
(
i
*
M_PI
/
36
);
errc
=
(
double
)
c
/
(
1
<<
30
)
-
cos
(
i
*
M_PI
/
36
);
if
(
fabs
(
errs
)
>
0
.
00000002
||
fabs
(
errc
)
>
0
.
001
)
{
printf
(
"sincos FAIL %d %f %f %f %f
\n
"
,
i
,
(
float
)
s
/
(
1
<<
30
),
(
float
)
c
/
(
1
<<
30
),
sin
(
i
*
M_PI
/
36
),
cos
(
i
*
M_PI
/
36
));
}
}
return
0
;
}
...
...
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