Skip to content

#define E 2.718281828459045235360287471352 #1792

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

Closed
RobTillaart opened this issue Jan 5, 2014 · 6 comments
Closed

#define E 2.718281828459045235360287471352 #1792

RobTillaart opened this issue Jan 5, 2014 · 6 comments

Comments

@RobTillaart
Copy link

Can e be added to Arduino.h ?

define E = 2.718281828459045235360287471352

source - http://www.miniwebtool.com/first-n-digits-of-e/?number=30

I needed it today for a test and it was not supported where PI is

(ok lowest prio)

@ffissore
Copy link
Contributor

ffissore commented Jan 5, 2014

Can the name be a little longer? Like EULER or E_EULER? I would like to avoid issues like #1735

@RobTillaart
Copy link
Author

#1735: Agree, replacing all E's with 2.7... would be nasty.

I have found EULER as M_E in - http://www.nongnu.org/avr-libc/user-manual/group__avr__math.html -
(of course it is in math.h :)

For Arduino.h EULER is a good name, no need to include math.h for the beginners.

@jantje
Copy link

jantje commented Jan 6, 2014

I don't want to be the bad guy but I think it should be
#define EULER 2.718281828459045235360287471352

instead of
#define EULER = 2.718281828459045235360287471352

@ffissore
Copy link
Contributor

ffissore commented Jan 6, 2014

Thank you for being a bad guy. Shame on me. Fixed.

@RobTillaart
Copy link
Author

#define Jantje right

@jantje
Copy link

jantje commented Jan 6, 2014

blush

@cmaglie cmaglie closed this as completed Jan 7, 2014
matthijskooijman added a commit to matthijskooijman/Arduino that referenced this issue Feb 19, 2014
A bunch of functions have parameters they do not use, but which cannot
be removed for API compatibility.

In syscalls_sam3.c, there are a lot of these, so this adds an "UNUSED"
macro which adds the "unused" variable attribute if supported (GCC
specific), or is just a noop on other compilers.

In CDC.cpp, there's only three of these variables, so this commit just
forces a dummy evaluation of them to suppress the warnings.

This helps towards arduino#1792.
matthijskooijman added a commit to matthijskooijman/Arduino that referenced this issue Feb 19, 2014
len is an unsigned variable, so it will never be less than 0.

This helps towards arduino#1792.
matthijskooijman added a commit to matthijskooijman/Arduino that referenced this issue Feb 19, 2014
This makes the declaration of sprintf available, so the function is not
implicitely declared, which triggers two compiler warnings.

This helps towards arduino#1792
matthijskooijman added a commit to matthijskooijman/Arduino that referenced this issue Feb 19, 2014
matthijskooijman added a commit to matthijskooijman/Arduino that referenced this issue Feb 19, 2014
Members of this array are later passed to functions that accept
non-const pointers. These functions probably don't modify their
arguments, so a better solution would be to update those functions to
accept const pointers. However, they look like third-party code, so that
would require changing the code again on every update. Removing const
here fixes at least the compiler warning for now.

This helps towards arduino#1792.
klightspeed pushed a commit to klightspeed/EthertenMP3Player that referenced this issue Aug 30, 2015
klightspeed pushed a commit to klightspeed/Arduino-Libraries that referenced this issue Sep 6, 2015
facchinm pushed a commit to arduino/ArduinoCore-avr that referenced this issue Sep 20, 2017
facchinm pushed a commit to arduino/ArduinoCore-avr that referenced this issue Sep 20, 2017
facchinm pushed a commit to arduino/ArduinoCore-avr that referenced this issue Sep 20, 2017
facchinm pushed a commit to arduino/ArduinoCore-avr that referenced this issue Sep 20, 2017
facchinm pushed a commit to arduino/ArduinoCore-avr that referenced this issue Sep 20, 2017
rickyrockrat pushed a commit to rickyrockrat/Arduino.hardware that referenced this issue Apr 10, 2018
ollie1400 pushed a commit to ollie1400/Arduino that referenced this issue May 2, 2022
ollie1400 pushed a commit to ollie1400/Arduino that referenced this issue May 2, 2022
A bunch of functions have parameters they do not use, but which cannot
be removed for API compatibility.

In syscalls_sam3.c, there are a lot of these, so this adds an "UNUSED"
macro which adds the "unused" variable attribute if supported (GCC
specific), or is just a noop on other compilers.

In CDC.cpp, there's only three of these variables, so this commit just
forces a dummy evaluation of them to suppress the warnings.

This helps towards arduino#1792.
ollie1400 pushed a commit to ollie1400/Arduino that referenced this issue May 2, 2022
len is an unsigned variable, so it will never be less than 0.

This helps towards arduino#1792.
ollie1400 pushed a commit to ollie1400/Arduino that referenced this issue May 2, 2022
This makes the declaration of sprintf available, so the function is not
implicitely declared, which triggers two compiler warnings.

This helps towards arduino#1792
ollie1400 pushed a commit to ollie1400/Arduino that referenced this issue May 2, 2022
ollie1400 pushed a commit to ollie1400/Arduino that referenced this issue May 2, 2022
Members of this array are later passed to functions that accept
non-const pointers. These functions probably don't modify their
arguments, so a better solution would be to update those functions to
accept const pointers. However, they look like third-party code, so that
would require changing the code again on every update. Removing const
here fixes at least the compiler warning for now.

This helps towards arduino#1792.
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

4 participants