Skip to content
Snippets Groups Projects
Select Git revision
  • dualcore
  • ch3/leds
  • wip-bootstrap default
  • ch3/time
  • master
5 results

formatfloat.c

Blame
    • Damien George's avatar
      03b8bb7e
      py/formatfloat: Fix case of float format where leading digit was "10". · 03b8bb7e
      Damien George authored
      When taking the logarithm of the float to determine the exponent, there
      are some edge cases that finish the log loop too large.  Eg for an
      input value of 1e32-epsilon, this is actually less than 1e32 from the
      log-loop table and finishes as 10.0e31 when it should be 1.0e32.  It
      is thus rendered as :e32 (: comes after 9 in ascii).
      
      There was the same problem with numbers less than 1.
      03b8bb7e
      History
      py/formatfloat: Fix case of float format where leading digit was "10".
      Damien George authored
      When taking the logarithm of the float to determine the exponent, there
      are some edge cases that finish the log loop too large.  Eg for an
      input value of 1e32-epsilon, this is actually less than 1e32 from the
      log-loop table and finishes as 10.0e31 when it should be 1.0e32.  It
      is thus rendered as :e32 (: comes after 9 in ascii).
      
      There was the same problem with numbers less than 1.