<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code-Only: int/long/double conversion to Spoken Numerics</title><link>http://weblogs.asp.net/justin_rogers/pages/151757.aspx</link><description>/* The below program works pretty well, but there are some round-off precision errors in the double that are giving me hell. I may or may not look into it. Ideally, if given a string, I'd parse the string. If given a number, then and only then would I</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: Code-Only: int/long/double conversion to Spoken Numerics</title><link>http://weblogs.asp.net/justin_rogers/pages/151757.aspx#7174168</link><pubDate>Wed, 19 Aug 2009 22:16:06 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7174168</guid><dc:creator>Spreety</dc:creator><author>Spreety</author><description>&lt;p&gt;Cool class. As a minor detail, a zero appears to cause an infinite loop.&lt;/p&gt;
&lt;p&gt;To fix, added a few lines:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public static string EnglishFromNumber(double number)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string sign = null;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (number == 0)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;Zero&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (number &amp;lt; 0)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sign = &amp;quot;Negative&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;number = Math.Abs(number);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7174168" width="1" height="1"&gt;</description></item><item><title>re: Code-Only: int/long/double conversion to Spoken Numerics</title><link>http://weblogs.asp.net/justin_rogers/pages/151757.aspx#6914742</link><pubDate>Wed, 18 Feb 2009 12:47:31 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6914742</guid><dc:creator>Chu</dc:creator><author>Chu</author><description>&lt;p&gt;How about from integer to sound.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6914742" width="1" height="1"&gt;</description></item><item><title>re: Code-Only: int/long/double conversion to Spoken Numerics</title><link>http://weblogs.asp.net/justin_rogers/pages/151757.aspx#6231474</link><pubDate>Fri, 30 May 2008 02:59:36 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6231474</guid><dc:creator>lypepusappy</dc:creator><author>lypepusappy</author><description>&lt;p&gt;&amp;lt;a href=&lt;a rel="nofollow" target="_new" href="http://docs.google.com/Doc?id=dc946tvk_12cgzc4cdg&amp;gt;Look"&gt;docs.google.com/Doc&lt;/a&gt; at this...&amp;lt;/a&amp;gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6231474" width="1" height="1"&gt;</description></item><item><title>A love little samples like this...</title><link>http://weblogs.asp.net/justin_rogers/pages/151757.aspx#152380</link><pubDate>Thu, 10 Jun 2004 10:02:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:152380</guid><dc:creator>TrackBack</dc:creator><author>TrackBack</author><description>&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=152380" width="1" height="1"&gt;</description></item><item><title>A conversion from integer to long form english...  I could write that ;-)</title><link>http://weblogs.asp.net/justin_rogers/pages/151757.aspx#151759</link><pubDate>Wed, 09 Jun 2004 18:25:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:151759</guid><dc:creator>TrackBack</dc:creator><author>TrackBack</author><description>&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=151759" width="1" height="1"&gt;</description></item></channel></rss>