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

FIX: Replace np.isfinite(cn) with cn * EPS < 1 in solve_discrete_riccati #361

Merged
merged 1 commit into from
Oct 23, 2017

Conversation

oyamad
Copy link
Member

@oyamad oyamad commented Oct 23, 2017

Fix #84

Followed #84 (comment), where I chose 1/(machine epsilon) for BIGNUMBER.

@oyamad oyamad requested a review from cc7768 October 23, 2017 03:12
@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 94.837% when pulling 334e1a3 on fix_riccati into 9ff0b7e on master.

@cc7768
Copy link
Member

cc7768 commented Oct 23, 2017

This seems like a straightforward fix -- Not much to review except the idea of checking whether we'd like to define x as infinite when x * _MACHINE_EPSILON > 1 which I think sounds like a reasonable suggestion if it fixes this error.

@mmcky, if you agree this is a good change then it should be ready to merge whenever you are ready.

@mmcky
Copy link
Contributor

mmcky commented Oct 23, 2017

Thanks @oyamad and @cc7768.

@mmcky mmcky merged commit 6b1f9a8 into master Oct 23, 2017
@mmcky mmcky deleted the fix_riccati branch October 23, 2017 23:26
oyamad added a commit to QuantEcon/QuantEcon.jl that referenced this pull request Oct 25, 2017
oyamad added a commit to QuantEcon/QuantEcon.jl that referenced this pull request Oct 25, 2017
sglyon pushed a commit to QuantEcon/QuantEcon.jl that referenced this pull request Oct 25, 2017
* FIX: Remove 0.0 from `candidates` in `solve_discrete_riccati`

QuantEcon/QuantEcon.py#364

* FIX: Replace `isfinite(cn)` with `cn * eps() < 1` in solve_discrete_riccati

QuantEcon/QuantEcon.py#361
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.

4 participants