-
Notifications
You must be signed in to change notification settings - Fork 98
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
s2d vs MSVC/Clang #157
Comments
d2s returns a number that is slightly different to what MSVC and CLang think they should be. d2s returns 1.2999999999999998e+154, the most insignificant bit is different. (unsigned long long)&d,x 0x5fef06d5a4bf631e vs |
This is due to an invalid shift value in Line 187 in 4cd47db
to
and possibly adding an |
thanks. this works great |
multipleOfPowerOf2 only works for exponents < 64. In this case here we have 0 < m10 < 2^64, so m10 can never be a multiple of 2^p if p >= 64.
i noticed that s2d disagrees with MSVC & CLang. Is this expected?
int main()
{
double d;
double e = 1.2999999999999999E+154;
s2d("1.2999999999999999E+154", &d);
assert(d==e); // assert occurs.
}
E
The text was updated successfully, but these errors were encountered: