[GRASS-dev] [GRASS GIS] #720: G_trim_decimal(): don't chop 0s on strings ending in e+20

GRASS GIS trac at osgeo.org
Sun Aug 16 04:55:36 EDT 2009


#720: G_trim_decimal(): don't chop 0s on strings ending in e+20
----------------------------+-----------------------------------------------
 Reporter:  hamish          |       Owner:  grass-dev at lists.osgeo.org
     Type:  defect          |      Status:  new                      
 Priority:  critical        |   Milestone:  6.4.0                    
Component:  libgis          |     Version:  6.4.0 RCs                
 Keywords:  G_trim_decimal  |    Platform:  All                      
      Cpu:  All             |  
----------------------------+-----------------------------------------------
 Hi,

 G_trim_decimal() will blindly chop away 0s after the decimal point,
 converting ,for example, a string ending in e+20 into e+2. :-(

 I guess 'e' needs to be the trigger character; if found we have a choice
 to either just return the original string or perform heroics
 such as:
 {{{
 1.234567890123460000000000000000e+20
     ->
 1.23456789012346e+20
 }}}

 ?


 thanks,
 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/720>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list