79356322

Date: 2025-01-14 20:40:34
Score: 3.5
Natty:
Report link

Thank's a a lot. What I understand from all this (I will explain with an example):

The number 0.20000000000000029 in double precision 0011111111001001100110011001100110011001100110011001100110100100 This is actually the number 0.20000000000000028865798640254070051014423370361328125

In Java( as you explained), this number is 0.2000000000000003. This number is enough to represent. Already in double precision, the number 0.2000000000000003 and the number 0.20000000000000028865798640254070051014423370361328125 is the same(0011111111001001100110011001100110011001100110011001100110100100).

Thus, %.20f will add zero to the number 0.2000000000000003 and print 0.20000000000000030000.

If it were %.15f, it would round the number 0.20000000000000030000 to 15 precision and write 0.200000000000000 on the screen.

If it were %.16f, it would round the number 0.20000000000000030000 to 16 precision and write 0,2000000000000003 on the screen. Right?

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Filler text (0.5): 00000000000000
  • Filler text (0): 11111111
  • Filler text (0): 00000000000000
  • Filler text (0): 00000000000000
  • Filler text (0): 00000000000000
  • Filler text (0): 00000000000000
  • Filler text (0): 11111111
  • Filler text (0): 00000000000000
  • Filler text (0): 00000000000000
  • Filler text (0): 00000000000000
  • Filler text (0): 00000000000000
  • Filler text (0): 00000000000000
  • Filler text (0): 00000000000000
  • Low reputation (0.5):
Posted by: İlker Deveci