Skip to content

Conversation

@dcourteville
Copy link

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Allows ITP to handle very small abstol (and in particular abstol=0.0) and very big intervals. This is required to use it in DiffEqBase.

Comment on lines +103 to +104
n_h = exponent(span / (2 * ϵ))
ϵ_s = ϵ * exp2(n_h) * exp2(n0)
Copy link
Member

Choose a reason for hiding this comment

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

why isn't this still exp2(n_h+n0)? I would expect that to be faster.

@dcourteville
Copy link
Author

The if/else ensure that exp2(n_h) < Inf but not that exp2(n_h + n0) < Inf. So ϵ * exp2(n_h) * exp2(n0) is safer since ϵ * exp2(n_h) ≈ span / 2.

@oscardssmith
Copy link
Member

yeah this makes sense. It is somewhat annoying that this is parameterized a little bit inefficiently, but realistically this won't cost any real performance.

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.

2 participants