Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1062

Show
Ignore:
Timestamp:
11/27/03 23:16:42 (5 years ago)
Author:
nahi
Message:

* Float#to_s uses scientific notation. use sprintf("%.*f", ...) to avoid it.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/xsd/datatypes.rb

    r1061 r1062  
    600600        s << ".#{ @secfrac }" 
    601601      else 
    602         s << ".#{ (@data.sec_fraction * SecInDay).to_f.to_s }" 
     602        s << sprintf("%.16f", (@data.sec_fraction * SecInDay).to_f).sub(/^0/, '').sub(/0*$/, '') 
    603603      end 
    604604    end 
     
    651651        s << ".#{ @secfrac }" 
    652652      else 
    653         s << ".#{ (@data.sec_fraction * SecInDay).to_f.to_s }" 
     653        s << sprintf("%.16f", (@data.sec_fraction * SecInDay).to_f).sub(/^0/, '').sub(/0*$/, '') 
    654654      end 
    655655    end