Menu

#33 131: floating point formatting is nonstandard in many ways

wont-fix-for-1.4
open
core (32)
4
2008-01-16
2006-03-09
No

Symbian's STDLIB float formatting currently causes a
lot of differences between PyS60 and the official
Python 2.2.

Examples:

- The formatting character %g isn't affected by
precision settings, so "%.3g" % 1.2345 equals to
"1.2345" although it should equal to "1.23" (three
significant numbers). Also, "%g" % 1000000 equals to
"1000000" although it should equal to "1e+006".

- Formatting large numbers using %f formats them
according to locale (e.g. "%f" % 10000 == "10,000.000000"

- eval('090000000000000.0000000000000000000000') gives
90000000000000.1, but expected 90000000000000.0

In the future the floating point formatting could use
an external library instead of the STDLIB ones. There
are probably open and free implementation that could be
adapted for this project with moderate ease.

Discussion

  • Jukka Laurila

    Jukka Laurila - 2006-08-28
    • priority: 5 --> 4
     
  • Jukka Laurila

    Jukka Laurila - 2007-02-19
    • labels: --> core
    • assigned_to: nobody --> jplauril
     
  • Jukka Laurila

    Jukka Laurila - 2007-06-12

    Logged In: YES
    user_id=1162622
    Originator: YES

    Pending a better formatting subsystem to be integrated in the future.

     
  • Jukka Laurila

    Jukka Laurila - 2007-06-12
    • milestone: --> wont-fix-for-1.4
    • status: open --> closed
     
  • Jukka Laurila

    Jukka Laurila - 2008-01-16
    • status: closed --> open
     

Log in to post a comment.