-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fix functions/values used for multiply x2 test #669
Fix functions/values used for multiply x2 test #669
Conversation
Should like 37 and 39 use the same format? I have no opinion on which is preferred (but happy to learn) |
The 'f' is for float only, not double (if I understand it right) |
So is 2e-6 interpreted as a double? |
I believe so, that is why you do not see a warning for that one |
This seems to be correct. I would prefer something like 2e-6f (but I am not sure it is allowed) just because I dislike having to count zeros |
With #include <stdlib.h>
#include <stdio.h>
int main() {
printf("sizeof() = %lu\n", sizeof(1e-6f));
} $ gcc test.c && ./a.out
sizeof() = 4 So it is possible to write the literal in |
I forgot to add that I would also prefer the 'e' notation. Counting zeros is error prone. |
Assuming this does not fail with any compilers we need, I would advocate this change, and approve otherwise. |
ce23c5b
to
ba2afd7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, will test on Intel and Darwin
No description provided.