Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ajou_fx_team4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
battle_c_4
ajou_fx_team4
Merge requests
!1
Update c&h files code
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Update c&h files code
HJM
into
master
Overview
0
Commits
1
Pipelines
0
Changes
24
Merged
HwangJungmok
requested to merge
HJM
into
master
4 years ago
Overview
0
Commits
1
Pipelines
0
Changes
24
Update c&h files code
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
e51a2bfd
1 commit,
4 years ago
24 files
+
852
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
24
fx_s1516_double.c
+
62
−
0
View file @ e51a2bfd
Edit in single-file editor
Open in Web IDE
// fx_s1516_double.c file
#include
"fx_s1516_double.h"
fx_s1516
double_to_fx
(
double
a
)
{
return
(
int
)(((
a
)
*
P2_16
));
}
double
fx_to_double
(
fx_s1516
a
)
{
return
((
double
)(
a
)
/
P2_16
);
}
double
fx_s1516_double_add
(
double
a
,
double
b
)
{
return
double_to_fx
((
a
)
+
(
b
));
}
double
fx_s1516_double_sub
(
double
a
,
double
b
)
{
return
double_to_fx
((
a
)
-
(
b
));
}
double
fx_s1516_double_mul
(
double
a
,
double
b
)
{
return
double_to_fx
((
a
)
*
(
b
)
*
P2_16
);
}
double
fx_s1516_double_div
(
double
a
,
double
b
)
{
return
double_to_fx
((
a
)
/
(
b
)
/
P2_16
);
}
double
degree_to_radian
(
double
a
)
{
return
((
a
)
*
fx_s1516_PI
/
180
);
}
double
fx_s1516_double_sin
(
double
a
)
{
return
double_to_fx
(
sin
(
a
*
P2_16
)
/
(
P2_16
));
}
double
fx_s1516_double_sqrt
(
double
a
)
{
return
double_to_fx
(
sqrt
(
a
)
/
sqrt
(
P2_16
));
}
double
fx_s1516_double_pow
(
double
a
,
double
b
)
{
return
double_to_fx
(
pow
(
a
,
(
double
)
b
)
*
pow
(
P2_16
,
(
double
)
b
-
1
));
}
double
fx_s1516_double_log
(
double
a
,
double
b
)
{
return
double_to_fx
(
baselog
(
a
*
P2_16
,
b
)
/
(
P2_16
));
}
double
baselog
(
double
a
,
double
base
)
{
return
log
(
a
)
/
log
(
base
);
}
Loading