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

implicit conversions from float to double #33

Open
jrahlf opened this issue Apr 22, 2021 · 0 comments
Open

implicit conversions from float to double #33

jrahlf opened this issue Apr 22, 2021 · 0 comments

Comments

@jrahlf
Copy link

jrahlf commented Apr 22, 2021

There are several implicit conversions from single precision to double precision happening in
float Adafruit_MAX31865::temperature(float RTDnominal, float refResistor)
for example:

Z3 = (4 * RTD_B) / RTDnominal;

Since the input and output variables are single precision, I suggest keeping all intermediary calculations as single precision as well. You get the respective warnings if you turn on -Wdouble-promotion.

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

1 participant