Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: fix undefined behavior in alngam #3899

Merged
merged 1 commit into from
Aug 24, 2014
Merged

Conversation

juliantaylor
Copy link
Contributor

INT(A) is undefined if A cannot be represented as INT
In MIPS the result is positive triggering a huge loop for:

scipy.stats.skellam.sf(np.inf, 10, 11)

@juliantaylor
Copy link
Contributor Author

my fortran-fu is weak, is there a better way to do that? (INT_MAX equivalent checking overflow flags maybe?)

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 290b089 on juliantaylor:skellam-ub into 24ab79f on scipy:master.

INT(A) is undefined if A cannot be represented as INT
In MIPS the result is positive triggering a huge loop for:

    scipy.stats.skellam.sf(np.inf, 10, 11)
@pv
Copy link
Member

pv commented Aug 24, 2014

Seems fine to me (and there's probably no way to do this better in F77).
Care to add a test for the infinite looping case? (Enough to just call the function --- (nearly) non termination will be obvious when running the tests)

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 26f8a09 on juliantaylor:skellam-ub into 24ab79f on scipy:master.

@juliantaylor
Copy link
Contributor Author

The test is already there (somewhere in stats). It was causing build timeouts on a mips machine which is how I found it.

pv added a commit that referenced this pull request Aug 24, 2014
BUG: special: fix undefined behavior in alngam

INT(A) is undefined if A cannot be represented as INT
In MIPS the result is positive triggering a huge loop.
@pv pv merged commit c09c196 into scipy:master Aug 24, 2014
@pv
Copy link
Member

pv commented Aug 24, 2014

Ok, merged.

@pv pv added this to the 0.15.0 milestone Aug 24, 2014
@juliantaylor juliantaylor deleted the skellam-ub branch August 30, 2015 11:18
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