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

Implement trigonometric functions #6

Open
clemisch opened this issue Apr 24, 2023 · 3 comments
Open

Implement trigonometric functions #6

clemisch opened this issue Apr 24, 2023 · 3 comments

Comments

@clemisch
Copy link

Sine and cosine are not implemented, as you state in the paper:

For example, we do not currently have a way to compute sharp Taylor enclosures for periodic functions, such as sine or cosine.

I only skimmed the paper, but I assume periodic functions are a non-trivial limitation?

@mstreeter
Copy link
Collaborator

Coming up with sharp (i.e., optimal) bounds for sine and cosine would require proving some new theorems. However, it wouldn't be too much work to implement non-sharp bounds based on the range of the kth derivative, and these bounds should still be pretty good in practice.

@clemisch
Copy link
Author

Just now coming back to this.

Does autobound have an interface for

non-sharp bounds based on the range of the kth derivative

? Or would I have to read the paper and implement it by hand?

@mstreeter
Copy link
Collaborator

Good question. The main thing that would need to be done is to modify the get_range() function in elementwise_functions.py so that it can compute the range of sin or cos, as well as the range of their derivatives:

def get_range(function_id: FunctionId,

This could be done by first normalizing the trust_region so that its endpoints are in the interval [-pi, pi], then using the existing _get_range() function which takes a list of local minima / maxima within the trust region. Let me know if any of this is unclear!

After that there is some boilerplate to hook things up, which I'd be happy to add.

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

No branches or pull requests

2 participants