Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c77088d0
Commit
c77088d0
authored
Aug 13, 2015
by
R David Murray
Browse files
Options
Browse Files
Download
Plain Diff
Merge: #21167: Fix definition of NAN when ICC used without -fp-model strict.
parents
2ebdc13d
edbc28ce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
Include/pymath.h
Include/pymath.h
+23
-1
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Include/pymath.h
View file @
c77088d0
...
...
@@ -150,7 +150,29 @@ PyAPI_FUNC(void) _Py_set_387controlword(unsigned short);
* doesn't support NaNs.
*/
#if !defined(Py_NAN) && !defined(Py_NO_NAN)
#define Py_NAN (Py_HUGE_VAL * 0.)
#if !defined(__INTEL_COMPILER)
#define Py_NAN (Py_HUGE_VAL * 0.)
#else
/* __INTEL_COMPILER */
#if defined(ICC_NAN_STRICT)
#pragma float_control(push)
#pragma float_control(precise, on)
#pragma float_control(except, on)
#if defined(_MSC_VER)
__declspec
(
noinline
)
#else
/* Linux */
__attribute__
((
noinline
))
#endif
/* _MSC_VER */
static
double
__icc_nan
()
{
return
sqrt
(
-
1
.
0
);
}
#pragma float_control (pop)
#define Py_NAN __icc_nan()
#else
/* ICC_NAN_RELAXED as default for Intel Compiler */
static
union
{
unsigned
char
buf
[
8
];
double
__icc_nan
;
}
__nan_store
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0xf8
,
0x7f
};
#define Py_NAN (__nan_store.__icc_nan)
#endif
/* ICC_NAN_STRICT */
#endif
/* __INTEL_COMPILER */
#endif
/* Py_OVERFLOWED(X)
...
...
Misc/ACKS
View file @
c77088d0
...
...
@@ -594,6 +594,7 @@ Gregor Hoffleit
Chris Hoffman
Stefan Hoffmeister
Albert Hofkamp
Chris Hogan
Tomas Hoger
Jonathan Hogg
Kamilla Holanda
...
...
Misc/NEWS
View file @
c77088d0
...
...
@@ -10,6 +10,9 @@ Release date: 2015-08-23
Core and Builtins
-----------------
- Issue #21167: NAN operations are now handled correctly when python is
compiled with ICC even if -fp-model strict is not specified.
Library
-------
...
...
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