Pavel M via Cygwin writes:
> Sample code (t903.c):
> #include <stdio.h>
> int main(void)
> {
>     printf("%.43f\n", 0x1.52f8a8e32e982p-140);
>     return 0;
> }
>
> Invocations:
> # gcc on Windows 10 (Cygwin)
> $ gcc t903.c -Wall -Wextra -std=c11 -pedantic -Wfatal-errors && ./a.exe
> 0.0000000000000000000000000000000000000000010

You will want to report this against newlib, I'd think.  If I remember
correctly, newlib uses a single guard digit for the conversion and for
such an algorithm the result you see is expected and correct.  Whether
any later C standard would mandate to use an algorithm that uses higher
precision (in terms of guard digits you'd end up with 15 for your
example before you get the expected result I think) I have no idea.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to