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

Updated the documentation of the trigonometry functions. #900

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jfjlaros
Copy link

All three functions have the following signature double (*)(double). This is
now reflected in the documentation.

All three functions have the following signature `double (*)(double)`. This is
now reflected in the documentation.
@per1234
Copy link
Collaborator

per1234 commented Aug 12, 2022

Hi @jfjlaros. Thanks for your contribution. I was able to verify this is correct for the AVR boards:

https://www.nongnu.org/avr-libc/user-manual/group__avr__math.html#func-members

However, it is not so clear to me for the other official Arduino boards architectures, which use the functions from cmath of the C++ Standard Library:

https://en.cppreference.com/w/cpp/header/cmath

It seems these templates could have either parameter type according to the type of the argument. Did I interpret it incorrectly?

@per1234 per1234 added bug Waiting for feedback More information must be provided before we can proceed labels Aug 12, 2022
@per1234 per1234 self-assigned this Aug 12, 2022
@jfjlaros
Copy link
Author

Hmm, interesting.

It seems that these functions are overloaded as float (*)(float) and long double (*)(long double) and additionally, there is a template that checks whether the parameter is of an integer type, in which case the result will be of type double, e.g., double (*)(int).

@jfjlaros
Copy link
Author

jfjlaros commented Aug 1, 2023

So, what to do?

Can we document the behaviour for the AVR boards and mention that non-AVR boards (may) use the standard library (which arguably should not be documented here)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Waiting for feedback More information must be provided before we can proceed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants