<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Scientific Notation to Double in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/scientific-notation-to-double/m-p/355651#M27955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could use string substitution techniques:&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; print '%13.11f' % float('.0340344E-4')
'0.00000340344'&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 16:39:25 GMT</pubDate>
    <dc:creator>BruceNielsen</dc:creator>
    <dc:date>2021-12-11T16:39:25Z</dc:date>
    <item>
      <title>Scientific Notation to Double</title>
      <link>https://community.esri.com/t5/python-questions/scientific-notation-to-double/m-p/355650#M27954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone know of an elegant way to convert a string that has a number represented by scientific notation ( e.g.&amp;nbsp; .0340344E-4) to a double?&amp;nbsp; I and trying to normalize a set of shape files from different sources and one of my providers gave me a length field in sci notation.&amp;nbsp; All the others are doubles.&amp;nbsp; or strings as doubles.&amp;nbsp; (e.g. "23.5")&amp;nbsp; I can handle the second case.&amp;nbsp; Not sure how to do the first without resorting to "brute force" parsing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 14:40:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scientific-notation-to-double/m-p/355650#M27954</guid>
      <dc:creator>WilliamIde</dc:creator>
      <dc:date>2012-01-26T14:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Scientific Notation to Double</title>
      <link>https://community.esri.com/t5/python-questions/scientific-notation-to-double/m-p/355651#M27955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could use string substitution techniques:&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; print '%13.11f' % float('.0340344E-4')
'0.00000340344'&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:39:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scientific-notation-to-double/m-p/355651#M27955</guid>
      <dc:creator>BruceNielsen</dc:creator>
      <dc:date>2021-12-11T16:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Scientific Notation to Double</title>
      <link>https://community.esri.com/t5/python-questions/scientific-notation-to-double/m-p/355652#M27956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def SciNoteToFloat(x):
&amp;nbsp;&amp;nbsp;&amp;nbsp; '''Takes a string writen in scientific notation and
&amp;nbsp;&amp;nbsp;&amp;nbsp; returns a float'''
&amp;nbsp;&amp;nbsp;&amp;nbsp; x = x.lower()
&amp;nbsp;&amp;nbsp;&amp;nbsp; x = x.partition("e")
&amp;nbsp;&amp;nbsp;&amp;nbsp; return (float(x[0])) * (int("1" + "0" * (-1 * int(x[2]))))
mynum = "0.223E-7"
print SciNoteToFloat(mynum)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:39:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scientific-notation-to-double/m-p/355652#M27956</guid>
      <dc:creator>GerryGabrisch</dc:creator>
      <dc:date>2021-12-11T16:39:27Z</dc:date>
    </item>
  </channel>
</rss>

