Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core-math
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core-math
core-math
Commits
04e80a02
Commit
04e80a02
authored
1 year ago
by
Alexei Sibidanov
Browse files
Options
Downloads
Patches
Plain Diff
log1pf and atanf: fix problems with signed zero arguments found by Paul
parent
4f6a157d
Branches
testing-roazhon8
No related tags found
No related merge requests found
Pipeline
#994642
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/binary32/atan/atanf.c
+3
-1
3 additions, 1 deletion
src/binary32/atan/atanf.c
src/binary32/log1p/log1pf.c
+4
-1
4 additions, 1 deletion
src/binary32/log1p/log1pf.c
with
7 additions
and
2 deletions
src/binary32/atan/atanf.c
+
3
−
1
View file @
04e80a02
...
@@ -46,8 +46,10 @@ float cr_atanf(float x){
...
@@ -46,8 +46,10 @@ float cr_atanf(float x){
return
__builtin_copysign
(
pi2
,(
double
)
x
);
// inf
return
__builtin_copysign
(
pi2
,(
double
)
x
);
// inf
}
}
if
(
__builtin_expect
(
e
<
127
-
13
,
0
)){
if
(
__builtin_expect
(
e
<
127
-
13
,
0
)){
if
(
__builtin_expect
(
e
<
127
-
25
,
0
))
if
(
__builtin_expect
(
e
<
127
-
25
,
0
)){
if
(
!
(
t
.
u
<<
1
))
return
x
;
return
__builtin_fmaf
(
-
x
,
__builtin_fabsf
(
x
),
x
);
return
__builtin_fmaf
(
-
x
,
__builtin_fabsf
(
x
),
x
);
}
return
__builtin_fmaf
(
-
0x1
.
5555555555555
p
-
2
f
*
x
,
x
*
x
,
x
);
return
__builtin_fmaf
(
-
0x1
.
5555555555555
p
-
2
f
*
x
,
x
*
x
,
x
);
}
}
/* now |x| >= 0x1p-13 */
/* now |x| >= 0x1p-13 */
...
...
This diff is collapsed.
Click to expand it.
src/binary32/log1p/log1pf.c
+
4
−
1
View file @
04e80a02
...
@@ -84,7 +84,10 @@ float cr_log1pf(float x) {
...
@@ -84,7 +84,10 @@ float cr_log1pf(float x) {
b32u32_u
t
=
{.
f
=
x
};
b32u32_u
t
=
{.
f
=
x
};
uint32_t
ux
=
t
.
u
,
ax
=
ux
&
(
~
0u
>>
1
);
uint32_t
ux
=
t
.
u
,
ax
=
ux
&
(
~
0u
>>
1
);
if
(
__builtin_expect
(
ax
<
0x3c880000
,
1
)){
if
(
__builtin_expect
(
ax
<
0x3c880000
,
1
)){
if
(
__builtin_expect
(
ax
<
0x33000000
,
0
))
return
__builtin_fmaf
(
x
,
-
x
,
x
);
if
(
__builtin_expect
(
ax
<
0x33000000
,
0
)){
if
(
!
ax
)
return
x
;
return
__builtin_fmaf
(
x
,
-
x
,
x
);
}
double
z2
=
z
*
z
,
z4
=
z2
*
z2
;
double
z2
=
z
*
z
,
z4
=
z2
*
z2
;
double
f
=
z2
*
((
b
[
1
]
+
z
*
b
[
2
])
+
z2
*
(
b
[
3
]
+
z
*
b
[
4
])
+
z4
*
((
b
[
5
]
+
z
*
b
[
6
])
+
z2
*
b
[
7
]));
double
f
=
z2
*
((
b
[
1
]
+
z
*
b
[
2
])
+
z2
*
(
b
[
3
]
+
z
*
b
[
4
])
+
z4
*
((
b
[
5
]
+
z
*
b
[
6
])
+
z2
*
b
[
7
]));
b64u64_u
r
=
{.
f
=
z
+
f
};
b64u64_u
r
=
{.
f
=
z
+
f
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment