Skip to main content
Hi community,

 

 

I have a script which translates database content into an SDF3-file. Writer and Reader are dynamically. The Reader gets its schema from the writer.

 

Now I got the effect that numbers with the value "100" are converted into "1e+031" in the SDF3-file. Within the scipt everything works fine. "100" stays "100". All other numbers, too. They are also correct in the SDF3-file. It just concernes the 100's.

 

I already tried to set the attribute again to the value "100" and add an attribute to the Writer with a type 'decimal', without success.

 

 

Can anybody help me?
Hi,

 

 

if your value "100" exits as "1e+31", then there is definitely a problem somewhere.

 

 

1e+31 equals 10000000000000000000000000000000, or ten thousand billion billion billion :-)

 

 

You could normally use a StringFormatter with format string like e.g. "16.0f" to convert from exponential notation to a decimal, but this won't work for such large numbers as they exceed the precision afforded by 64-bit floating point numbers (which I believe is used internally in FME).

 

 

Consider using an ExpressionEvaluator to scale the number down first, if you really need to work with such large numbers.

 

 

David

Reply