Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork130
Description
Hi folks,
I know it has been discussed already here and there...
I find semantically wrong the fact that the following math functions are implemented as macros:
abs,min,max,constrain,round... and let me addbitWrite to the list.
It is well known that using these function the way the rest of the world does, introduces faults, and therefore generates failures.
Writing something likeabs(cos(x) - 123 * sq(sin(x)) would introduceredundant calculations, just a crazy delay in this case...
Writing something likeabs(a += b) orabs(i++) just introduces afault... it does something different (wrong in fact).
Assuming that usingtemplate andinline functions would solve the issue with no extra executable space taken, I would like to know if there is any other good reason why those dangerous
macro definitions are still in force.
Kind regards,
Iacopo.