News for hackers. Stuff that matters.
Re:Formatting floating point numbers by firethief on Friday June 14, 2019 @02:25PM (#20185374)
IMO hex should be the default representation of binary fp. Printing hex gives the exact value, without giving the illusion of having precision in the hundreds of digits, and can be done way faster than conversion to decimal.

  >>> 0.1.hex()
  0x1.999999999999ap-4
  >>> 1e-100.hex()
  0x1.bff2ee48e0530p-333

There are no comments on this comment yet.