Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
aa47f396
Commit
aa47f396
authored
Jul 01, 2014
by
Damien George
Browse files
Merge pull request #734 from iabdalkader/copysign
Add copysignf
parents
caa73341
5d44e6a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
stmhal/math.c
View file @
aa47f396
...
...
@@ -72,6 +72,7 @@ float __attribute__((pcs("aapcs"))) __aeabi_d2f(double x) {
fx
.
m
=
(
dx
.
m
>>
(
52
-
23
));
// right justify
return
fx
.
f
;
}
double
__aeabi_dmul
(
double
x
,
double
y
)
{
return
0
.
0
;
...
...
@@ -85,6 +86,18 @@ float sqrtf(float x) {
return
x
;
}
#ifndef NDEBUG
float
copysignf
(
float
x
,
float
y
)
{
float_s_t
fx
=
{.
f
=
x
};
float_s_t
fy
=
{.
f
=
y
};
// copy sign bit;
fx
.
s
=
fy
.
s
;
return
fx
.
f
;
}
#endif
// some compilers define log2f in terms of logf
#ifdef log2f
#undef log2f
...
...
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