Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MSVC fixes#5207

Merged
charris merged 2 commits into
numpy:masterfrom
juliantaylor:msvc-fix
Oct 21, 2014
Merged

MSVC fixes#5207
charris merged 2 commits into
numpy:masterfrom
juliantaylor:msvc-fix

Conversation

@juliantaylor
Copy link
Copy Markdown
Contributor

fix undefined reference of ldexpl/frexpl and the cbrt fallback raising an invalid flag on nan input.

The functions are macros in msvc which we undefine and redeclare in
npy_math. Since we now generate the ldexpl and frexpl ufuncs in numpygh-4852
this was broken by the extra logic for them in npy_config.h
cbrt does not set the invalid flag on nan input as all inputs are valid.
Fix the fallback to behave the same.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this one, the same code is in v1.8.2. What is the motivation? I'm sure there is a reason...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think its necessary. The motivation was, AFAICT, that since frexp and ldexp were wrapped by hand the logic for using the double versions for long double also needed to be by hand. In npy_math we just wrap these like any other now, meaning that we always call the double version for long double if we don't have an explicit l version, so this logic shouldn't be necessary.

@ewmoore
Copy link
Copy Markdown
Contributor

ewmoore commented Oct 20, 2014

Thanks for cleaning this up, Julian. This breakage certainly goes on me.

@charris
Copy link
Copy Markdown
Member

charris commented Oct 21, 2014

@ewmoore OK, we will give it a shot. The previous was also a gamble...

charris added a commit that referenced this pull request Oct 21, 2014
@charris charris merged commit a435de3 into numpy:master Oct 21, 2014
@charris
Copy link
Copy Markdown
Member

charris commented Oct 21, 2014

Thanks Julian.

@juliantaylor juliantaylor deleted the msvc-fix branch November 8, 2014 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants