fork download
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. double factor = nextafter(0x1.ffffffp-1 / 0xffffffffp0, 0.0);
  5. unsigned int x = 0xffffffff;
  6. float f = (float)((double)x * factor);
  7. printf("factor:%a\nunrounded:%a\nresult:%a\n", factor, (double)x * factor, f);
  8. return 0;
  9. }
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
factor:0x1.ffffff01fffffp-33
unrounded:0x1.fffffefffffffp-1
result:0x1.fffffep-1