<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" 
      xmlns:dc="http://purl.org/dc/elements/1.1/"
      xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
      xmlns:admin="http://webns.net/mvcb/"
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>DrQue.Net&#45;&#45; Andrew Que&#39;s corner of the net</title>
    <link>http://www.DrQue.com/</link>
    <description>Andrew Que&#39;s photoblog</description>
    <dc:language>en-us</dc:language>
    <dc:creator>Andrew Que</dc:creator>
    <dc:rights>Copyright 2005-2006</dc:rights>
    <dc:date>2013-06-20T08:06:19Z </dc:date>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>12</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
      <item>
        <title>06/08/2013 North-west trip day 7</title>
        <link>http://www.DrQue.net/index.php?ArticleNumber=2659#_2659</link>
        <description>06/08/2013 North-west trip day 7</description>
        <content:encoded>
<![CDATA[
    <table border="0" cellpadding="0" cellspacing="2">
      <tr>
        <td>
          <table border="0" style="float: left; margin: 5px;" cellpadding="0" cellspacing="0">
            <tr>

              <td>
                <img src="http://www.DrQue.net/Gallery/2013_06_08/300x300/05.JPG" style="border: 0px" alt="" />
              </td>

            </tr>
            <tr>

              <td align="center">
                <b>Columbia River</b>
                <table width="100%" cellpadding="0" cellspacing="0">
                  <tr>
                    <td align="center">
                      <table style="margin-top: 4px">
                        <tr>
                          <td>
                            <small>
                              (<a href="http://www.DrQue.net//Gallery/" onclick="window.open(this.href,'_blank');return false;">Gallery</a>)
                            </small>
                            <small>
                              (<a href="http://www.DrQue.net//Computers/" onclick="window.open(this.href,'_blank');return false;">Computers</a>)
                            </small>
                            <small>
                              (<a href="http://www.DrQue.net//Includes/" onclick="window.open(this.href,'_blank');return false;">Includes</a>)
                            </small>
<br />                            <small>
                              (<a href="http://www.DrQue.net//Proxy/" onclick="window.open(this.href,'_blank');return false;">Proxy</a>)
                            </small>
                            <small>
                              (<a href="http://www.DrQue.net//NewsAdmin/" onclick="window.open(this.href,'_blank');return false;">NewsAdmin</a>)
                            </small>
                            <small>
                              (<a href="http://www.DrQue.net//Images/" onclick="window.open(this.href,'_blank');return false;">Images</a>)
                            </small>
<br />                            <small>
                              (<a href="http://www.DrQue.net//Temp/" onclick="window.open(this.href,'_blank');return false;">Temp</a>)
                            </small>
                            <small>
                              (<a href="http://www.DrQue.net//Public/" onclick="window.open(this.href,'_blank');return false;">Public</a>)
                            </small>
                            <small>
                              (<a href="http://www.DrQue.net//Templates/" onclick="window.open(this.href,'_blank');return false;">Templates</a>)
                            </small>
<br />                            <small>
                              (<a href="http://www.DrQue.net//freecap/" onclick="window.open(this.href,'_blank');return false;">freecap</a>)
                            </small>
                            <small>
                              (<a href="http://www.DrQue.net//Utilities/" onclick="window.open(this.href,'_blank');return false;">Utilities</a>)
                            </small>
                            <small>
                              (<a href="http://www.DrQue.net//Stories/" onclick="window.open(this.href,'_blank');return false;">Stories</a>)
                            </small>
<br />                            <small>
                              (<a href="http://www.DrQue.net//PublicLogs/" onclick="window.open(this.href,'_blank');return false;">PublicLogs</a>)
                            </small>
                            <small>
                              (<a href="http://www.DrQue.net//GalleryNew/" onclick="window.open(this.href,'_blank');return false;">GalleryNew</a>)
                            </small>
                            <small>
                              (<a href="http://www.DrQue.net//Code/" onclick="window.open(this.href,'_blank');return false;">Code</a>)
                            </small>
<br />                          </td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                </table>
              </td>

            </tr>
          </table>
          &nbsp;&nbsp; A week on the road, it was time to work my way to Seattle.&nbsp; I didn't have much planned after this point in the trip, so it was more or less stop at whatever looked interesting.<br />&nbsp;&nbsp; I entered Washington state in the morning, and it wasn't at all what I had expected.&nbsp; The eastern part of the state is dry and hot.&nbsp; My first stop was near <a href="https://maps.google.com/maps?q=Vantage,&#43;Washington">Vantage, Washington</a> at a look out area that had a great view of the <a href="http://en.wikipedia.org/wiki/Columbia_River">Columbia River</a> and the <a href="http://en.wikipedia.org/wiki/Vantage_Bridge">Vantage Bridge</a>.&nbsp; After I crossed the river, I stopped at <a href="http://en.wikipedia.org/wiki/Ginkgo_Petrified_Forest_State_Park">Ginkgo Petrified Forest State Park</a> and walked the paths to see some petrified trees.&nbsp; Unfortunately, they were all caged off, presumably to prevent vandalism.&nbsp; It didn't make for good pictures but it was interesting to see.&nbsp; I didn't walk for long.&nbsp; The temperature was 90<span class="st">&deg;F (32</span><span class="st"><span class="st">&deg;</span>C) and I don't function in heat like that.<br />&nbsp;&nbsp; After a couple hours of driving, I was back in the mountains and the temperature was again becoming tolerable.&nbsp; I reached Seattle and started south to Tacoma to visit some friends.&nbsp; Lance and Tara took me to a good Indian restaurant, shared some good local beer and put me up for the night.<br /></span>
        </td>
      </tr>
      <tr>
        <td>
          <table width="100%" cellpadding="0" cellspacing="0">
            <tr>
              <td align="center">
                <table class="CommentTableBody" width="98%">
                  <tr>
                    <td class="CommentTableCell"> 
                      <div style="text-align: center">No comments have been added </div>
                      </td>
                    </tr>
                    <tr>
                      <td class="CommentTableCell"> 
                        <div style="text-align: center">
                          <a href="http://www.DrQue.net/index.php?ArticleNumber=2659&amp;CommentArticle=2659#_2659" >
                            + Add a comment
                          </a>
                        </div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>

]]>        </content:encoded>
        <dc:subject>Daily photos</dc:subject>
        <dc:date>2013-06-08T15:06:15Z</dc:date>
      </item>
        <item>
          <title>06/07/2013 North-west trip day 6</title>
          <link>http://www.DrQue.net/index.php?ArticleNumber=2658#_2658</link>
          <description>06/07/2013 North-west trip day 6</description>
          <content:encoded>
<![CDATA[
      <table border="0" cellpadding="0" cellspacing="2">
        <tr>
          <td>
            <table border="0" style="float: left; margin: 5px;" cellpadding="0" cellspacing="0">
              <tr>

                <td>
                  <img src="http://www.DrQue.net/Gallery/2013_06_07/300x300/GlacierNationalPark_05.JPG" style="border: 0px" alt="" />
                </td>

              </tr>
              <tr>

                <td align="center">
                  <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                      <td align="center">
                        <table style="margin-top: 4px">
                          <tr>
                            <td>
                              <small>
                                (<a href="http://www.DrQue.net//Gallery/" onclick="window.open(this.href,'_blank');return false;">Gallery</a>)
                              </small>
                              <small>
                                (<a href="http://www.DrQue.net//Computers/" onclick="window.open(this.href,'_blank');return false;">Computers</a>)
                              </small>
                              <small>
                                (<a href="http://www.DrQue.net//Includes/" onclick="window.open(this.href,'_blank');return false;">Includes</a>)
                              </small>
<br />                              <small>
                                (<a href="http://www.DrQue.net//Proxy/" onclick="window.open(this.href,'_blank');return false;">Proxy</a>)
                              </small>
                              <small>
                                (<a href="http://www.DrQue.net//NewsAdmin/" onclick="window.open(this.href,'_blank');return false;">NewsAdmin</a>)
                              </small>
                              <small>
                                (<a href="http://www.DrQue.net//Images/" onclick="window.open(this.href,'_blank');return false;">Images</a>)
                              </small>
<br />                              <small>
                                (<a href="http://www.DrQue.net//Temp/" onclick="window.open(this.href,'_blank');return false;">Temp</a>)
                              </small>
                              <small>
                                (<a href="http://www.DrQue.net//Public/" onclick="window.open(this.href,'_blank');return false;">Public</a>)
                              </small>
                              <small>
                                (<a href="http://www.DrQue.net//Templates/" onclick="window.open(this.href,'_blank');return false;">Templates</a>)
                              </small>
<br />                              <small>
                                (<a href="http://www.DrQue.net//freecap/" onclick="window.open(this.href,'_blank');return false;">freecap</a>)
                              </small>
                              <small>
                                (<a href="http://www.DrQue.net//Utilities/" onclick="window.open(this.href,'_blank');return false;">Utilities</a>)
                              </small>
                              <small>
                                (<a href="http://www.DrQue.net//Stories/" onclick="window.open(this.href,'_blank');return false;">Stories</a>)
                              </small>
<br />                              <small>
                                (<a href="http://www.DrQue.net//PublicLogs/" onclick="window.open(this.href,'_blank');return false;">PublicLogs</a>)
                              </small>
                              <small>
                                (<a href="http://www.DrQue.net//GalleryNew/" onclick="window.open(this.href,'_blank');return false;">GalleryNew</a>)
                              </small>
                              <small>
                                (<a href="http://www.DrQue.net//Code/" onclick="window.open(this.href,'_blank');return false;">Code</a>)
                              </small>
<br />                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>

              </tr>
            </table>
            &nbsp;&nbsp; I visited the <a href="http://www.montananaturalist.org/">Montana Natural History Center</a> in Missoula in the morning, and then started north.&nbsp; I took a beautiful drive along the eastern show of <a href="https://maps.google.com/maps?q=Flathead&#43;Lake">Flathead Lake</a>.&nbsp; On the recommendation of a friend, I stopped at the <a href="http://www.montanavortex.com/">House Of Mystery</a> near Columbia Fall, Montana.&nbsp; She was right about it being an interesting optical illusion, but I ended up quite motion sick afterward.&nbsp; I went to find the <a href="https://maps.google.com/maps?q=hungry&#43;horse&#43;dam">Hungry Horse Dam</a>, but ended up sleeping for an hour to fight off the motion sickness first.&nbsp; <br />&nbsp;&nbsp; The <a href="http://en.wikipedia.org/wiki/Hungry_Horse_Dam">Hungry Horse Dam</a> is by far the largest I have ever seen.&nbsp; At 564 feet tall, it's massive and has a generating capacity of 428 megawatts.&nbsp; That's a lot of clean power.&nbsp; For comparison, the power plant on the east side of Madison is a 100 megawatt facility.<br />&nbsp;&nbsp; I continued north and entered Glacier National Park by West Glacier.&nbsp; I had never seen a glacier, and it was on the list of things to do.&nbsp; I'm still not sure I saw one as the main road through the park was closed about halfway.&nbsp; There was no reason given for the closure, but I assume rock fall or something of that nature.&nbsp; Reguardless, the park was magnificent.&nbsp; A large part of the park had burned in a fire in 2003, and remnants were visible in patches all over.&nbsp; It is interesting to see how quickly life returns after an event like that.<br />&nbsp;&nbsp; Just as I reached the turn around at Glacier Park, a thunderstorm rolled in.&nbsp; It dropped very little rain and didn't last too long.&nbsp; I didn't much feel like hiking anyway, so I didn't feel bad about it.&nbsp; I returned the way I had come and started my way west.<br />&nbsp;&nbsp; I wanted to stop near the eastern state line of Idaho, but couldn't find anything until I reached Post Fall near the western edge.&nbsp; An other truck stop for the evening.
          </td>
        </tr>
        <tr>
          <td>
            <table width="100%" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center">
                  <table class="CommentTableBody" width="98%">
                    <tr>
                      <td class="CommentTableCell"> 
                        <div style="text-align: center">No comments have been added </div>
                        </td>
                      </tr>
                      <tr>
                        <td class="CommentTableCell"> 
                          <div style="text-align: center">
                            <a href="http://www.DrQue.net/index.php?ArticleNumber=2658&amp;CommentArticle=2658#_2658" >
                              + Add a comment
                            </a>
                          </div>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>

]]>          </content:encoded>
          <dc:subject>Daily photos</dc:subject>
          <dc:date>2013-06-07T20:06:15Z</dc:date>
        </item>
          <item>
            <title>06/06/2013 North-west trip day 5</title>
            <link>http://www.DrQue.net/index.php?ArticleNumber=2657#_2657</link>
            <description>06/06/2013 North-west trip day 5</description>
            <content:encoded>
<![CDATA[
        <table border="0" cellpadding="0" cellspacing="2">
          <tr>
            <td>
              <table border="0" style="float: left; margin: 5px;" cellpadding="0" cellspacing="0">
                <tr>

                  <td>
                    <img src="http://www.DrQue.net/Gallery/2013_06_06/300x300/OldFaithfulEruption_03.JPG" style="border: 0px" alt="" />
                  </td>

                </tr>
                <tr>

                  <td align="center">
                    <b>Old Faithful</b>
                    <table width="100%" cellpadding="0" cellspacing="0">
                      <tr>
                        <td align="center">
                          <table style="margin-top: 4px">
                            <tr>
                              <td>
                                <small>
                                  (<a href="http://www.DrQue.net//Gallery/" onclick="window.open(this.href,'_blank');return false;">Gallery</a>)
                                </small>
                                <small>
                                  (<a href="http://www.DrQue.net//Computers/" onclick="window.open(this.href,'_blank');return false;">Computers</a>)
                                </small>
                                <small>
                                  (<a href="http://www.DrQue.net//Includes/" onclick="window.open(this.href,'_blank');return false;">Includes</a>)
                                </small>
<br />                                <small>
                                  (<a href="http://www.DrQue.net//Proxy/" onclick="window.open(this.href,'_blank');return false;">Proxy</a>)
                                </small>
                                <small>
                                  (<a href="http://www.DrQue.net//NewsAdmin/" onclick="window.open(this.href,'_blank');return false;">NewsAdmin</a>)
                                </small>
                                <small>
                                  (<a href="http://www.DrQue.net//Images/" onclick="window.open(this.href,'_blank');return false;">Images</a>)
                                </small>
<br />                                <small>
                                  (<a href="http://www.DrQue.net//Temp/" onclick="window.open(this.href,'_blank');return false;">Temp</a>)
                                </small>
                                <small>
                                  (<a href="http://www.DrQue.net//Public/" onclick="window.open(this.href,'_blank');return false;">Public</a>)
                                </small>
                                <small>
                                  (<a href="http://www.DrQue.net//Templates/" onclick="window.open(this.href,'_blank');return false;">Templates</a>)
                                </small>
<br />                                <small>
                                  (<a href="http://www.DrQue.net//freecap/" onclick="window.open(this.href,'_blank');return false;">freecap</a>)
                                </small>
                                <small>
                                  (<a href="http://www.DrQue.net//Utilities/" onclick="window.open(this.href,'_blank');return false;">Utilities</a>)
                                </small>
                                <small>
                                  (<a href="http://www.DrQue.net//Stories/" onclick="window.open(this.href,'_blank');return false;">Stories</a>)
                                </small>
<br />                                <small>
                                  (<a href="http://www.DrQue.net//PublicLogs/" onclick="window.open(this.href,'_blank');return false;">PublicLogs</a>)
                                </small>
                                <small>
                                  (<a href="http://www.DrQue.net//GalleryNew/" onclick="window.open(this.href,'_blank');return false;">GalleryNew</a>)
                                </small>
                                <small>
                                  (<a href="http://www.DrQue.net//Code/" onclick="window.open(this.href,'_blank');return false;">Code</a>)
                                </small>
<br />                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                    </table>
                  </td>

                </tr>
              </table>
              &nbsp;&nbsp; I woke up around 9:00 am refreshed and ready to go.&nbsp; Sleeping in a volcano for the night was one of my better ideas and I decided after this point in the trip not to rush things.&nbsp; As I was getting up, Old Faithful was erupting.&nbsp; Being a predictable geyser, I knew I had around 90 minutes before it happened again.&nbsp; So I walked the grounds looking at the springs, vents and other geysers.&nbsp; Then it was time to see my first geyser eruption.&nbsp; Within one minute of the predicted time, Old Faithful began an other display.&nbsp; It is impressive to consider that between 4 and 8 thousand gallons of water had just been ejected at times 100 feet into the air.&nbsp; The amount of energy needed for that single event is on the order of 1.9e8 joules (52.7 kilowatt hours)&mdash;enough power to run my computer wide open for 6 months.&nbsp; That amount of energy, every 90 minutes for just one geyser of many on this unique <a href="https://en.wikipedia.org/wiki/Hotspot_%28geology%29">geological hot-spot</a>.&nbsp; The engineer in me is very impressed.<br />&nbsp;&nbsp; After playing with geysers and reading everything worthwhile in the visitor center, it was time to move on.&nbsp; I took a slow drive through Yellowstone, often pulling over to lets others pass and to take pictures.&nbsp; When I was finially out of the park, it was time to make my way north.&nbsp; <br />&nbsp;&nbsp; My next stop was <a href="http://en.wikipedia.org/wiki/Berkeley_Pit">Berkeley Pit</a> in <a href="https://maps.google.com/maps?q=Butte,&#43;Montana">Butte, Montana</a>.&nbsp; It is both am engineering marvel and an ecological disaster.&nbsp; Over a mile wide, the pit is slowly filling with highly acidic water full of dissolved heavy metals.&nbsp; The water threatens to spill into the ground water supply, but the display at the visitor center talks very positive about efforts underway to take care of this issue.&nbsp; Interesting lesson in just because we can (and did), should we?<br />&nbsp;&nbsp; While in Butte, I decided to find a car wash.&nbsp; Every time I leaned against my muddy car I get some on me.&nbsp; I don't think I had ever washed any of my vehicles before this.&nbsp; My next scheduled stops were in Missoula, MT, but I arrived too late to do either.&nbsp; So I decided to pick up some camping gear and do laundry.&nbsp; While I had a good supply of socks and boxers, I was low on shirts.&nbsp; And my pants were muddy from my car.&nbsp; I also picked up a foam pad to place my sleeping bag on, and a propane burner.&nbsp; I thought I would make more use of the propane burner for cooking, but I only ended up using it that first night to cook some soup.&nbsp; It did a good job, but I didn't feel like soup the remainder of the trip.<br />&nbsp;&nbsp; I found an other truck stop for the evening in a place called <a href="https://maps.google.com/maps?q=Bonner,&#43;Montana">Bonner, Montana</a>.&nbsp; They lady at the truck stop told me it was pronounced &quot;bon-er&quot; (bon like in bonfire).&nbsp; That's probably how they said it, but I know a <a href="http://dictionary.reference.com/browse/boner">boner</a> when I see one.&nbsp; Clean laundry, soup for dinner, and a new sleeping pad, it was time for bed.
            </td>
          </tr>
          <tr>
            <td>
              <table width="100%" cellpadding="0" cellspacing="0">
                <tr>
                  <td align="center">
                    <table class="CommentTableBody" width="98%">
                      <tr>
                        <td class="CommentTableCell"> 
                          <div style="text-align: center">No comments have been added </div>
                          </td>
                        </tr>
                        <tr>
                          <td class="CommentTableCell"> 
                            <div style="text-align: center">
                              <a href="http://www.DrQue.net/index.php?ArticleNumber=2657&amp;CommentArticle=2657#_2657" >
                                + Add a comment
                              </a>
                            </div>
                          </td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>

]]>            </content:encoded>
            <dc:subject>Daily photos</dc:subject>
            <dc:date>2013-06-06T15:06:15Z</dc:date>
          </item>
            <item>
              <title>06/05/2013 North-west trip day 4</title>
              <link>http://www.DrQue.net/index.php?ArticleNumber=2656#_2656</link>
              <description>06/05/2013 North-west trip day 4</description>
              <content:encoded>
<![CDATA[
          <table border="0" cellpadding="0" cellspacing="2">
            <tr>
              <td>
                <table border="0" style="float: left; margin: 5px;" cellpadding="0" cellspacing="0">
                  <tr>

                    <td>
                      <img src="http://www.DrQue.net/Gallery/2013_06_05/300x300/HotSpringsStatePark_12.JPG" style="border: 0px" alt="" />
                    </td>

                  </tr>
                  <tr>

                    <td align="center">
                      <b>Hot Springs State Park</b>
                      <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                          <td align="center">
                            <table style="margin-top: 4px">
                              <tr>
                                <td>
                                  <small>
                                    (<a href="http://www.DrQue.net//Gallery/" onclick="window.open(this.href,'_blank');return false;">Gallery</a>)
                                  </small>
                                  <small>
                                    (<a href="http://www.DrQue.net//Computers/" onclick="window.open(this.href,'_blank');return false;">Computers</a>)
                                  </small>
                                  <small>
                                    (<a href="http://www.DrQue.net//Includes/" onclick="window.open(this.href,'_blank');return false;">Includes</a>)
                                  </small>
<br />                                  <small>
                                    (<a href="http://www.DrQue.net//Proxy/" onclick="window.open(this.href,'_blank');return false;">Proxy</a>)
                                  </small>
                                  <small>
                                    (<a href="http://www.DrQue.net//NewsAdmin/" onclick="window.open(this.href,'_blank');return false;">NewsAdmin</a>)
                                  </small>
                                  <small>
                                    (<a href="http://www.DrQue.net//Images/" onclick="window.open(this.href,'_blank');return false;">Images</a>)
                                  </small>
<br />                                  <small>
                                    (<a href="http://www.DrQue.net//Temp/" onclick="window.open(this.href,'_blank');return false;">Temp</a>)
                                  </small>
                                  <small>
                                    (<a href="http://www.DrQue.net//Public/" onclick="window.open(this.href,'_blank');return false;">Public</a>)
                                  </small>
                                  <small>
                                    (<a href="http://www.DrQue.net//Templates/" onclick="window.open(this.href,'_blank');return false;">Templates</a>)
                                  </small>
<br />                                  <small>
                                    (<a href="http://www.DrQue.net//freecap/" onclick="window.open(this.href,'_blank');return false;">freecap</a>)
                                  </small>
                                  <small>
                                    (<a href="http://www.DrQue.net//Utilities/" onclick="window.open(this.href,'_blank');return false;">Utilities</a>)
                                  </small>
                                  <small>
                                    (<a href="http://www.DrQue.net//Stories/" onclick="window.open(this.href,'_blank');return false;">Stories</a>)
                                  </small>
<br />                                  <small>
                                    (<a href="http://www.DrQue.net//PublicLogs/" onclick="window.open(this.href,'_blank');return false;">PublicLogs</a>)
                                  </small>
                                  <small>
                                    (<a href="http://www.DrQue.net//GalleryNew/" onclick="window.open(this.href,'_blank');return false;">GalleryNew</a>)
                                  </small>
                                  <small>
                                    (<a href="http://www.DrQue.net//Code/" onclick="window.open(this.href,'_blank');return false;">Code</a>)
                                  </small>
<br />                                </td>
                              </tr>
                            </table>
                          </td>
                        </tr>
                      </table>
                    </td>

                  </tr>
                </table>
                &nbsp;&nbsp; It had now been 4 days since I had bathed, and it was time to take advantage of trucker facilities.&nbsp; Although a truck stop shower is rather overpriced it does get the job done.&nbsp; Now it was time to take my newly mudded car to <a href="https://maps.google.com/maps?q=Thermopolis,&#43;WY">Thermopolis, WY</a>.&nbsp; My first stop was somewhere along Hwy 16 while crossing the <a href="http://en.wikipedia.org/wiki/Big_Horn_Mountains">Big Horn Mountains</a>.&nbsp; The reason: <a href="http://www.drque.net/Gallery/2013_06_05/900x900/09.JPG">snow</a>.&nbsp; It was 37<span class="st">&deg;F</span> (2.8<span class="st">&deg;</span>C), and the altitude was over 9,000 feet.&nbsp; For me, it is a real treat to see snow in June.&nbsp; <br />&nbsp; My next stop was the <a href="http://www.wyodino.org/">Wyoming Dinosaur Museum</a> in Thermopolis, WY&nbsp; While the building just looks like a metal shed in randomly sitting on the edge of town, it is by far the best dinosaur exhibit I have ever seen.&nbsp; It ran chronologically starting just before the Cambrian Explosion and worked it's way to modern mammals.&nbsp; The layout and information was fantastic and I must have spent at least an hour reading every placard.&nbsp; Their collection of fossils was also impressive, several of which I had seen in pictures before.&nbsp; The last part of the exhibit was the large dinosaur skeletons.&nbsp; It's hard to appreciate the size of a <a href="javascript:void(0);/*1371678449590*/">supersaurus</a> without standing next one it's skeleton.<br />&nbsp;&nbsp; After getting a good education on evolutionary history, it was off to <a href="http://thermopolis.com/todo/hot-springs-state-park/">Hot Springs State Park</a>.&nbsp; This is the first time I had ever seen a hot spring.&nbsp; I was expecting a stronger smell, but it was not the case.&nbsp; There was a distinct sulpher smell in the air, but it wasn't overpowering.&nbsp; The runoff from the hot spring created some interesting mineral deposits.&nbsp; I was surprised at how clear the water was in the spring itself.&nbsp; An other nice first.<br />&nbsp;&nbsp; From Thermopolis it was off to <a href="http://www.nps.gov/yell/">Yellowstone National Park</a>.&nbsp; I had planned to visit <a href="http://en.wikipedia.org/wiki/Old_Faithful">Old Faithful</a> first, but had setup the GPS with an incorrect destination.&nbsp; As I entered Yellowstone the first thing I encountered were several <a href="http://en.wikipedia.org/wiki/Bison">bison</a> grazing by the side of the road.&nbsp; I have seen bison before, but never wondering around in the wild.&nbsp; They seemed to care little about my car, which after all was only slightly larger than they were.&nbsp; After that first encounter, I saw several more herds of them throughout my drive.&nbsp; But it was the first group I saw the closest.&nbsp; Something special about seeing the largest land animal in North America whose ancestors were the among the <a href="http://en.wikipedia.org/wiki/Pleistocene_megafauna">Pleistocene Megafauna</a>, now all extinct.<br />&nbsp;&nbsp; Yellow Stone is beautiful, but I had hopped to see a <a href="http://en.wikipedia.org/wiki/Geyser">geyser</a> before the end of the evening so I was rushing a bit.&nbsp; Even so, I still pulled over several times to look around.&nbsp; I reached <a href="http://en.wikipedia.org/wiki/Mammoth_Hot_Springs">Mammoth Hot Springs</a> and soon figured out I had the wrong location.&nbsp; Old Faithful was about an hour away, and the sun would be gone by then.&nbsp; Most of the rest areas I passed said no over night camping, which I assumed applied to people sleeping in their trunk as I was.&nbsp; There were also no truck stops anywhere near me.&nbsp; I had planned to see Old Faithful and leave the park.&nbsp; Now my plans had been thwarted.&nbsp; However, an idea dawned on me.&nbsp; Old Faithful has a large lodge.&nbsp; The park was full of people, and the lodge parking lot was probably like most of the other parking lots&mdash;full of cars.&nbsp; No one would notice if I parked there overnight.<br />&nbsp;&nbsp; So I spent the last of the daylight hours walking and photographing Mammoth Hot Springs.&nbsp; I think it was worth my time as it was much larger than the hot springs in Thermopolis.&nbsp; I set out for Old Faithful as the sun was pretty much gone.&nbsp; During this part of the drive, I passed two canines walking by the road.&nbsp; They were either wolfs or coyotes, but I am not sure which.&nbsp; The with the second canine, I stopped in the road to watch him pass.&nbsp; While he looked at me, he didn't seem in the least bit concerned with my presents.&nbsp; Beautiful animal though.&nbsp; It was too dark to even bother trying to get a shot.&nbsp; I also encountered an owl who swooped down in front of my car as I drove by.&nbsp; I'm not sure I have ever seen an owl in the wild.&nbsp; So wild canines and owls&mdash;an other first I was pleased to have.<br />&nbsp;&nbsp; As the evening progressed, I pulled over an attempted to photograph the stars.&nbsp; My tripod was dead, so I just set my camera on the roof of my car.&nbsp; That would have worked, but it was so dark I could find no light point to set my focus.&nbsp; The goal was to see if I couldn't photograph the <a href="http://en.wikipedia.org/wiki/Milky_Way">Milky Way</a>.&nbsp; I may have done it, but all my shots were blurry.<br />&nbsp;&nbsp; I at last arrived at Old Faithful and found a nice parking spot where Eve was surrounded by cars and tour buses.&nbsp; I brushed my teeth, crawled in the truck and slept soundly at an altitude of 7,300 feet in a <a href="http://en.wikipedia.org/wiki/Volcanic_caldera">volcanic caldera</a>.&nbsp; A day of many firsts.
              </td>
            </tr>
            <tr>
              <td>
                <table width="100%" cellpadding="0" cellspacing="0">
                  <tr>
                    <td align="center">
                      <table class="CommentTableBody" width="98%">
                        <tr>
                          <td class="CommentTableCell"> 
                            <div style="text-align: center">No comments have been added </div>
                            </td>
                          </tr>
                          <tr>
                            <td class="CommentTableCell"> 
                              <div style="text-align: center">
                                <a href="http://www.DrQue.net/index.php?ArticleNumber=2656&amp;CommentArticle=2656#_2656" >
                                  + Add a comment
                                </a>
                              </div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>

]]>              </content:encoded>
              <dc:subject>Daily photos</dc:subject>
              <dc:date>2013-06-05T15:06:15Z</dc:date>
            </item>
              <item>
                <title>06/04/2013 North-west trip day 3</title>
                <link>http://www.DrQue.net/index.php?ArticleNumber=2655#_2655</link>
                <description>06/04/2013 North-west trip day 3</description>
                <content:encoded>
<![CDATA[
            <table border="0" cellpadding="0" cellspacing="2">
              <tr>
                <td>
                  <table border="0" style="float: left; margin: 5px;" cellpadding="0" cellspacing="0">
                    <tr>

                      <td>
                        <img src="http://www.DrQue.net/Gallery/2013_06_04/300x300/04.jpg" style="border: 0px" alt="" />
                      </td>

                    </tr>
                    <tr>

                      <td align="center">
                        <b>Joe, myself, and Brenna</b>
                        <table width="100%" cellpadding="0" cellspacing="0">
                          <tr>
                            <td align="center">
                              <table style="margin-top: 4px">
                                <tr>
                                  <td>
                                    <small>
                                      (<a href="http://www.DrQue.net//Gallery/" onclick="window.open(this.href,'_blank');return false;">Gallery</a>)
                                    </small>
                                    <small>
                                      (<a href="http://www.DrQue.net//Computers/" onclick="window.open(this.href,'_blank');return false;">Computers</a>)
                                    </small>
                                    <small>
                                      (<a href="http://www.DrQue.net//Includes/" onclick="window.open(this.href,'_blank');return false;">Includes</a>)
                                    </small>
<br />                                    <small>
                                      (<a href="http://www.DrQue.net//Proxy/" onclick="window.open(this.href,'_blank');return false;">Proxy</a>)
                                    </small>
                                    <small>
                                      (<a href="http://www.DrQue.net//NewsAdmin/" onclick="window.open(this.href,'_blank');return false;">NewsAdmin</a>)
                                    </small>
                                    <small>
                                      (<a href="http://www.DrQue.net//Images/" onclick="window.open(this.href,'_blank');return false;">Images</a>)
                                    </small>
<br />                                    <small>
                                      (<a href="http://www.DrQue.net//Temp/" onclick="window.open(this.href,'_blank');return false;">Temp</a>)
                                    </small>
                                    <small>
                                      (<a href="http://www.DrQue.net//Public/" onclick="window.open(this.href,'_blank');return false;">Public</a>)
                                    </small>
                                    <small>
                                      (<a href="http://www.DrQue.net//Templates/" onclick="window.open(this.href,'_blank');return false;">Templates</a>)
                                    </small>
<br />                                    <small>
                                      (<a href="http://www.DrQue.net//freecap/" onclick="window.open(this.href,'_blank');return false;">freecap</a>)
                                    </small>
                                    <small>
                                      (<a href="http://www.DrQue.net//Utilities/" onclick="window.open(this.href,'_blank');return false;">Utilities</a>)
                                    </small>
                                    <small>
                                      (<a href="http://www.DrQue.net//Stories/" onclick="window.open(this.href,'_blank');return false;">Stories</a>)
                                    </small>
<br />                                    <small>
                                      (<a href="http://www.DrQue.net//PublicLogs/" onclick="window.open(this.href,'_blank');return false;">PublicLogs</a>)
                                    </small>
                                    <small>
                                      (<a href="http://www.DrQue.net//GalleryNew/" onclick="window.open(this.href,'_blank');return false;">GalleryNew</a>)
                                    </small>
                                    <small>
                                      (<a href="http://www.DrQue.net//Code/" onclick="window.open(this.href,'_blank');return false;">Code</a>)
                                    </small>
<br />                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>

                    </tr>
                  </table>
                  &nbsp;&nbsp; Most of today was spent in the <a href="http://en.wikipedia.org/wiki/Black_Hills">Black Hills</a>.&nbsp; I started with the <a href="https://en.wikipedia.org/wiki/Crazy_Horse_Memorial">Crazy Horse Monument</a> and arrived just in time to see a rock blast.&nbsp; Most of my time was spent reading about the native American peoples detailed in the exhibits at the visitor center.<br />&nbsp;&nbsp; After Crazy Horse, I set out of <a href="http://en.wikipedia.org/wiki/Jewel_Cave">Jewel Cave</a> and two Australian hitch hikers.&nbsp; They were also going to Jewel Cave so we decided to all go together.&nbsp; We did two tours.&nbsp; One was a basic introductory tour just in one of the main chamber of the cave, and the other was a more in depth loop.&nbsp; The tour is only a tinny portion of the total cave, of which they believe the 160&#43; miles currently mapped is about 5% of the total cave.&nbsp; I think I want to get more into caving after this tour.&nbsp; I like the dark and small spaces very much, and the challenges of exploring sound like the kind of challenges I like.<br />&nbsp;&nbsp; I dropped my hitch hiking friend in Sturgis, SD and continued onto my last destination for the evening: <a href="javascript:void(0);/*1371675864916*/">Devils Tower</a>.&nbsp; I arrived near sunset and in hindsight I should have found a place to sleep so I could have spent more time to enjoy it.&nbsp; After a few pictures I set out to learn a valuable lessons about Wyoming roads and the GPS I was using: just because the GPS says to turn on a road doesn't necessary mean it is a road, or one a 2004 Toyota Corolla should attempt to drive.&nbsp; At one point I turned onto a &quot;road&quot; that was nothing more than two ruts going through tall grass.&nbsp; There was several large mud puddles that required the gathering of speed in order to get through them.&nbsp; Eve transformed from a suburban front-wheel drive family car into a 4x4 mudding truck.&nbsp; Getting stuck wasn't an option.&nbsp; I was in the middle of nowhere, with no cell phone service, after sunset.&nbsp; But Eve again proved she is just as good as any truck and saw me through it.&nbsp; After we got on the paved road, <a href="http://www.drque.net/Gallery/2013_06_06/900x900/Eve_02.JPG">Eve was a filthy mess</a>.&nbsp; I decided backtracking wasn't so bad when out west.<br />&nbsp;&nbsp; I eventually found a Flying-J truck stop in <a href="http://maps.google.com/maps?q=Gillette,&#43;WY">Gillette, WY</a> to sleep for the evening.
                </td>
              </tr>
              <tr>
                <td>
                  <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                      <td align="center">
                        <table class="CommentTableBody" width="98%">
                          <tr>
                            <td class="CommentTableCell"> 
                              <div style="text-align: center">No comments have been added </div>
                              </td>
                            </tr>
                            <tr>
                              <td class="CommentTableCell"> 
                                <div style="text-align: center">
                                  <a href="http://www.DrQue.net/index.php?ArticleNumber=2655&amp;CommentArticle=2655#_2655" >
                                    + Add a comment
                                  </a>
                                </div>
                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
              </table>

]]>                </content:encoded>
                <dc:subject>Daily photos</dc:subject>
                <dc:date>2013-06-04T15:06:15Z</dc:date>
              </item>
                <item>
                  <title>06/03/2013 North-west trip day 2</title>
                  <link>http://www.DrQue.net/index.php?ArticleNumber=2654#_2654</link>
                  <description>06/03/2013 North-west trip day 2</description>
                  <content:encoded>
<![CDATA[
              <table border="0" cellpadding="0" cellspacing="2">
                <tr>
                  <td>
                    <table border="0" style="float: left; margin: 5px;" cellpadding="0" cellspacing="0">
                      <tr>

                        <td>
                          <img src="http://www.DrQue.net/Gallery/2013_06_03/300x300/049.jpg" style="border: 0px" alt="" />
                        </td>

                      </tr>
                      <tr>

                        <td align="center">
                          <table width="100%" cellpadding="0" cellspacing="0">
                            <tr>
                              <td align="center">
                                <table style="margin-top: 4px">
                                  <tr>
                                    <td>
                                      <small>
                                        (<a href="http://www.DrQue.net//Gallery/" onclick="window.open(this.href,'_blank');return false;">Gallery</a>)
                                      </small>
                                      <small>
                                        (<a href="http://www.DrQue.net//Computers/" onclick="window.open(this.href,'_blank');return false;">Computers</a>)
                                      </small>
                                      <small>
                                        (<a href="http://www.DrQue.net//Includes/" onclick="window.open(this.href,'_blank');return false;">Includes</a>)
                                      </small>
<br />                                      <small>
                                        (<a href="http://www.DrQue.net//Proxy/" onclick="window.open(this.href,'_blank');return false;">Proxy</a>)
                                      </small>
                                      <small>
                                        (<a href="http://www.DrQue.net//NewsAdmin/" onclick="window.open(this.href,'_blank');return false;">NewsAdmin</a>)
                                      </small>
                                      <small>
                                        (<a href="http://www.DrQue.net//Images/" onclick="window.open(this.href,'_blank');return false;">Images</a>)
                                      </small>
<br />                                      <small>
                                        (<a href="http://www.DrQue.net//Temp/" onclick="window.open(this.href,'_blank');return false;">Temp</a>)
                                      </small>
                                      <small>
                                        (<a href="http://www.DrQue.net//Public/" onclick="window.open(this.href,'_blank');return false;">Public</a>)
                                      </small>
                                      <small>
                                        (<a href="http://www.DrQue.net//Templates/" onclick="window.open(this.href,'_blank');return false;">Templates</a>)
                                      </small>
<br />                                      <small>
                                        (<a href="http://www.DrQue.net//freecap/" onclick="window.open(this.href,'_blank');return false;">freecap</a>)
                                      </small>
                                      <small>
                                        (<a href="http://www.DrQue.net//Utilities/" onclick="window.open(this.href,'_blank');return false;">Utilities</a>)
                                      </small>
                                      <small>
                                        (<a href="http://www.DrQue.net//Stories/" onclick="window.open(this.href,'_blank');return false;">Stories</a>)
                                      </small>
<br />                                      <small>
                                        (<a href="http://www.DrQue.net//PublicLogs/" onclick="window.open(this.href,'_blank');return false;">PublicLogs</a>)
                                      </small>
                                      <small>
                                        (<a href="http://www.DrQue.net//GalleryNew/" onclick="window.open(this.href,'_blank');return false;">GalleryNew</a>)
                                      </small>
                                      <small>
                                        (<a href="http://www.DrQue.net//Code/" onclick="window.open(this.href,'_blank');return false;">Code</a>)
                                      </small>
<br />                                    </td>
                                  </tr>
                                </table>
                              </td>
                            </tr>
                          </table>
                        </td>

                      </tr>
                    </table>
                    &nbsp;&nbsp; The day started a little latter than expected as I slept quite well.&nbsp; I first stopped at the Sioux Falls and picked up groceries and ice.&nbsp; This trip I wanted to eat better than in road trips past, so I borrowed Xiphos' cooler so I could keep perishable food.&nbsp; This turned out to be a great plan as I ended up eating from the cooler the entire trip.<br />&nbsp;&nbsp; My next stop was the <a href="http://www.cornpalace.org/">Corn Palace</a> in Mitchell, SD.&nbsp; I didn't spend a lot of time there, but it was interesting to see murals made of corn husks.&nbsp; While in Mitchell I also got an oil change.&nbsp; Then it was back to driving.<br />&nbsp;&nbsp; I arrived in the <a href="http://maps.google.com/maps?q=Badlands&#43;National&#43;Park">Badlands</a> around 7:00 pm, and I really wasn't prepared for what I was about to see.&nbsp; There was nothing I could compare it to&mdash;the ground went from being flat and then just dropped a couple hundred feet.&nbsp; I spent the rest of the evening driving around Badlands National Park and stopped at every pullover point. <br />&nbsp;&nbsp; It is one thing to see places like this in pictures, but it is quite an other to expense the vast size of these eroded formations in person.&nbsp; It was a nice birthday present.&nbsp; Of the 684 pictures I took, I kept 108.&nbsp; None of them can really present the feeling of standing there.<br />&nbsp;&nbsp; The evening ended at a <a href="http://maps.google.com/maps?q=&#43;44%C2%B016%2756.23%22N,&#43;103%C2%B025%2720.62%22W">rest area near Tilford, SD<span style="color: rgb(0, 0, 0);"></span></a>.
                  </td>
                </tr>
                <tr>
                  <td>
                    <table width="100%" cellpadding="0" cellspacing="0">
                      <tr>
                        <td align="center">
                          <table class="CommentTableBody" width="98%">
                            <tr>
                              <td class="CommentTableCell"> 
                                <div style="text-align: center">No comments have been added </div>
                                </td>
                              </tr>
                              <tr>
                                <td class="CommentTableCell"> 
                                  <div style="text-align: center">
                                    <a href="http://www.DrQue.net/index.php?ArticleNumber=2654&amp;CommentArticle=2654#_2654" >
                                      + Add a comment
                                    </a>
                                  </div>
                                </td>
                              </tr>
                            </table>
                          </td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                </table>

]]>                  </content:encoded>
                  <dc:subject>Daily photos</dc:subject>
                  <dc:date>2013-06-03T15:06:15Z</dc:date>
                </item>
                  <item>
                    <title>06/02/2013 The trip begins</title>
                    <link>http://www.DrQue.net/index.php?ArticleNumber=2653#_2653</link>
                    <description>06/02/2013 The trip begins</description>
                    <content:encoded>
<![CDATA[
                <table border="0" cellpadding="0" cellspacing="2">
                  <tr>
                    <td>
                      <table border="0" style="float: left; margin: 5px;" cellpadding="0" cellspacing="0">
                        <tr>

                          <td>
                            <img src="http://www.DrQue.net/Gallery/2013_05_26/300x300/Ben&amp;Amber2.jpg" style="border: 0px" alt="" />
                          </td>

                        </tr>
                        <tr>

                          <td align="center">
                            <b>Ben and Amber</b>
                            <table width="100%" cellpadding="0" cellspacing="0">
                              <tr>
                                <td align="center">
                                  <table style="margin-top: 4px">
                                    <tr>
                                      <td>
                                        <small>
                                          (<a href="http://www.DrQue.net//Gallery/" onclick="window.open(this.href,'_blank');return false;">Gallery</a>)
                                        </small>
                                        <small>
                                          (<a href="http://www.DrQue.net//Computers/" onclick="window.open(this.href,'_blank');return false;">Computers</a>)
                                        </small>
                                        <small>
                                          (<a href="http://www.DrQue.net//Includes/" onclick="window.open(this.href,'_blank');return false;">Includes</a>)
                                        </small>
<br />                                        <small>
                                          (<a href="http://www.DrQue.net//Proxy/" onclick="window.open(this.href,'_blank');return false;">Proxy</a>)
                                        </small>
                                        <small>
                                          (<a href="http://www.DrQue.net//NewsAdmin/" onclick="window.open(this.href,'_blank');return false;">NewsAdmin</a>)
                                        </small>
                                        <small>
                                          (<a href="http://www.DrQue.net//Images/" onclick="window.open(this.href,'_blank');return false;">Images</a>)
                                        </small>
<br />                                        <small>
                                          (<a href="http://www.DrQue.net//Temp/" onclick="window.open(this.href,'_blank');return false;">Temp</a>)
                                        </small>
                                        <small>
                                          (<a href="http://www.DrQue.net//Public/" onclick="window.open(this.href,'_blank');return false;">Public</a>)
                                        </small>
                                        <small>
                                          (<a href="http://www.DrQue.net//Templates/" onclick="window.open(this.href,'_blank');return false;">Templates</a>)
                                        </small>
<br />                                        <small>
                                          (<a href="http://www.DrQue.net//freecap/" onclick="window.open(this.href,'_blank');return false;">freecap</a>)
                                        </small>
                                        <small>
                                          (<a href="http://www.DrQue.net//Utilities/" onclick="window.open(this.href,'_blank');return false;">Utilities</a>)
                                        </small>
                                        <small>
                                          (<a href="http://www.DrQue.net//Stories/" onclick="window.open(this.href,'_blank');return false;">Stories</a>)
                                        </small>
<br />                                        <small>
                                          (<a href="http://www.DrQue.net//PublicLogs/" onclick="window.open(this.href,'_blank');return false;">PublicLogs</a>)
                                        </small>
                                        <small>
                                          (<a href="http://www.DrQue.net//GalleryNew/" onclick="window.open(this.href,'_blank');return false;">GalleryNew</a>)
                                        </small>
                                        <small>
                                          (<a href="http://www.DrQue.net//Code/" onclick="window.open(this.href,'_blank');return false;">Code</a>)
                                        </small>
<br />                                      </td>
                                    </tr>
                                  </table>
                                </td>
                              </tr>
                            </table>
                          </td>

                        </tr>
                      </table>
                      &nbsp;&nbsp; This evening I set out on my trip out west.&nbsp; I have several destinations in mind and plan to greatly reduce the list of states I have yet to see.&nbsp; Among the destinations are the Rockey Mountains, which I have never been.&nbsp; I wanted to make it to South Dakota but didn't leave in time to make it that far.&nbsp; I reached a <a href="http://maps.google.com/maps?q=&#43;43%C2%B039%2747.24%22N,&#43;&#43;94%C2%B0&#43;7%271.70%22W&amp;hl=en&amp;ie=UTF8&amp;ll=43.663122,-94.10893&amp;spn=0.027165,0.026908&amp;sll=43.642287,-94.026318&amp;sspn=0.054348,0.086517&amp;t=h&amp;gl=us&amp;z=15">rest area in Blue Earth, Minnesota</a> and stopped for the night.
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                          <td align="center">
                            <table class="CommentTableBody" width="98%">
                              <tr>
                                <td class="CommentTableCell"> 
                                  <div style="text-align: center">No comments have been added </div>
                                  </td>
                                </tr>
                                <tr>
                                  <td class="CommentTableCell"> 
                                    <div style="text-align: center">
                                      <a href="http://www.DrQue.net/index.php?ArticleNumber=2653&amp;CommentArticle=2653#_2653" >
                                        + Add a comment
                                      </a>
                                    </div>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>

]]>                    </content:encoded>
                    <dc:subject>Daily photos</dc:subject>
                    <dc:date>2013-06-02T15:06:15Z</dc:date>
                  </item>
                      <item>
                        <title>06/01/2013 Computing Cosine with BC Math</title>
                        <link>http://www.DrQue.net/index.php?ArticleNumber=2652#_2652</link>
                        <description>06/01/2013 Computing Cosine with BC Math</description>
                        <content:encoded>
<![CDATA[
                  <table border="0" cellpadding="0" cellspacing="2">
                    <tr>
                      <td>
                        <p class="Main">       When implementing <a href="http://en.wikipedia.org/wiki/Sine">sine</a>       and cosine for the <a href="http://www.php.net/manual/en/book.bc.php">bcmath</a>       version of my <a href="http://www.drque.net/Projects/GaussNewton/">Gauss-Newton       class</a>, I used the <a href="http://en.wikipedia.org/wiki/Maclaurin_series#List_of_Maclaurin_series_of_some_common_functions">Maclaurin       series</a>. Unfortunately, this ends up being slow to converge for       numbers close to <a href="http://en.wikipedia.org/wiki/%u03A0">&pi;</a>.       The slow <a href="http://en.wikipedia.org/wiki/Convergence_(mathematics)">convergence</a>       had required setting the bcmath scale to twice the current value in order       to get accurate calculations. This made the performance of the function       very slow.     </p>     <p class="Main">       I wrote about using some algebraic <a href="http://www.drque.net/index.php?ArticleNumber=2636#_2636">tricks to       speed the convergence</a> of natural log and the exponential       function, and I began to think about ways I could do this with my       trigonometric functions. I had investigated trying to use a modified       series:     </p>     <p align="center">       <img width="194" height="40" style="background: white" src="/Public/2013-06-01/CosineTaylorseries_html_m4366f74e.gif" alt="" />     </p>     <p class="Main">       It would have allowed me to do this:     </p>     <p align="center">       <img width="185" height="41" style="background: white" src="/Public/2013-06-01/CosineTaylorseries_html_m135a0ebf.gif" alt="" />     </p>     <p class="Main">       So I could just multiply the series result by the exponential of the       input. However, the series just seemed like a mess and I didn't get very       far with it.     </p>     <p class="Main">       My next line of thought was to see if I could use the <a href="https://en.wikipedia.org/wiki/Taylor_series">Taylor series</a>       speed up the convergence. I had done this <a href="http://www.drque.net/index.php?ArticleNumber=2144#_2144">in the past</a>       using a look-up table for some known points to quickly calculate the       Taylor series for the exponential function. Here is the general expression       for the Taylor series of a given function:     </p>     <p align="center">       <img width="173" height="43" style="background: white" src="/Public/2013-06-01/CosineTaylorseries_html_3dda9684.gif" alt="" />     </p>     <p class="Main">       In this algorithm <em>f</em><sup>(</sup><sup><em>n</em></sup><sup>)</sup>       is the n<sup>th</sup> <a href="http://en.wikipedia.org/wiki/Derivative">derivative</a> of the       <a href="http://en.wikipedia.org/wiki/Function_(mathematics)">function</a>       <em>f</em>( <em>x</em> ). The variable <em>b</em> is some point we pick. What <em>b</em> allows us to do is pick a point close to       <em>x</em> and       compute the series starting there. The Maclaurin series is just a Taylor series where <em>b</em> is always zero. However, using the Taylor       series with the value of <em>b</em> closer to <em>x</em> than <em>x</em> is to zero will result in the Taylor series       converging faster than the Maclaurin       series.     </p>     <p class="Main">       So let us apply the Taylor series for cosine with any <em>b</em>:     </p>     <p align="center">       <img width="182" height="43" style="background: white" src="/Public/2013-06-01/CosineTaylorseries_html_m5d815c23.gif" alt="" />     </p>     <p class="Main">       Keep       in mind that cos<sup>(</sup><sup><em>n</em></sup><sup>)</sup> is the n<sup>th</sup>       derivative of cosine&mdash;not the power&mdash;as we are using <a href="http://en.wikipedia.org/wiki/Lagrange's_notation#Lagrange.27s_notation">Lagrange's       notation</a>. At first it doesn't look like this will be too useful.       Now we need cosine, all       it's derivatives, and those values calculated       for some <em>b</em>. However,       this is where the properties of sine become useful. Recall the following       about the sine function:     </p>     <p align="center">       <img width="114" height="73" style="background: white" src="/Public/2013-06-01/CosineTaylorseries_html_6afe1ecd.gif" alt="" />     </p>     <p class="Main">       In       addition, there are some special points were we get an exact real number       for these trigonometric functions.     </p>     <p align="center">       <img width="166" height="108" style="background: white" src="/Public/2013-06-01/CosineTaylorseries_html_m4727da4.gif" alt="" />     </p>     <p class="Main">       So       we have four values that can be used for <em>b</em> and we       know how the derivatives will change. Time to put       this together.     </p>     <p class="Main">       Here       is the PHP implementation:     </p>      <div style="margin: 0 auto; border: 1px solid #FF0000; background-color: #000080; overflow: auto;height: 400px; width: 680px;">       <div style="color: #FFFF00; background-color: #000080; font-family: Courier New, Courier, mono; font-size: 14px; font-weight: bold;">         <span style="color: #C0C0C0">/*         <br />&nbsp;*&nbsp;Computes&nbsp;cosine&nbsp;of&nbsp;x.         <br />&nbsp;*&nbsp;@author&nbsp;Andrew&nbsp;Que.         <br />&nbsp;*&nbsp;@license&nbsp;Public&nbsp;domain.         <br />&nbsp;*/         <br /></span><span style="color: #FFFFFF">function&nbsp;</span><span style="color: #FFFF00">bccos</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$x</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$isSine&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">false&nbsp;</span><span style="color: #FFFFFF">)         <br />{         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Cosine&nbsp;and&nbsp;sine&nbsp;repeat&nbsp;in&nbsp;intervals&nbsp;of&nbsp;2*pi&nbsp;&gt;=&nbsp;x&nbsp;&gt;=&nbsp;-2*pi.&nbsp;&nbsp;So&nbsp;reduce         <br />&nbsp;&nbsp;//&nbsp;input&nbsp;down&nbsp;to&nbsp;this&nbsp;range.         <br />&nbsp;&nbsp;//&nbsp;To&nbsp;do&nbsp;this,&nbsp;get&nbsp;the&nbsp;whole&nbsp;number&nbsp;of&nbsp;how&nbsp;many&nbsp;times&nbsp;two&nbsp;pi&nbsp;divides&nbsp;into&nbsp;the         <br />&nbsp;&nbsp;//&nbsp;value.&nbsp;&nbsp;Then&nbsp;subtract&nbsp;off&nbsp;the&nbsp;whole&nbsp;number&nbsp;part&nbsp;times&nbsp;two&nbsp;pi.&nbsp;&nbsp;This&nbsp;is&nbsp;a         <br />&nbsp;&nbsp;//&nbsp;modulus&nbsp;remainder,&nbsp;but&nbsp;bcmod&nbsp;only&nbsp;returns&nbsp;the&nbsp;integer&nbsp;part&nbsp;of&nbsp;the         <br />&nbsp;&nbsp;//&nbsp;remainder.         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$twoPi&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcmul</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">bcpi</span><span style="color: #FFFFFF">(),&nbsp;</span><span style="color: #FFFF00">2&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$mod&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcdiv</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$x</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$twoPi&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;list(&nbsp;</span><span style="color: #FFFF00">$whole</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$fractional&nbsp;</span><span style="color: #FFFFFF">)&nbsp;=&nbsp;</span><span style="color: #FFFF00">explode</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #00FFFF">'.'</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$mod&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$x&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcsub</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$x</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">bcmul</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$whole</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$twoPi&nbsp;</span><span style="color: #FFFFFF">)&nbsp;);         <br />         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$correction&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcpi</span><span style="color: #FFFFFF">();         <br />         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Modify&nbsp;the&nbsp;scale&nbsp;for&nbsp;additional&nbsp;accuracy.         <br />&nbsp;&nbsp;//&nbsp;Done&nbsp;after&nbsp;the&nbsp;interval&nbsp;has&nbsp;been&nbsp;reduced&nbsp;to&nbsp;avoid&nbsp;rounds&nbsp;errors&nbsp;with&nbsp;pi.         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$scale&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcGetScale</span><span style="color: #FFFFFF">();         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">bcscale</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$scale&nbsp;</span><span style="color: #FFFFFF">&#43;&nbsp;</span><span style="color: #FFFF00">5&nbsp;</span><span style="color: #FFFFFF">);         <br />         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//-----------------------------------         <br />&nbsp;&nbsp;//&nbsp;The&nbsp;Taylor&nbsp;series&nbsp;for&nbsp;cosine&nbsp;is&nbsp;as&nbsp;follows:         <br />&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inf         <br />&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;---         <br />&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#92;&nbsp;&nbsp;&nbsp;&nbsp;d^n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(x&nbsp;-&nbsp;b)^n         <br />&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;----&nbsp;cos(x)&nbsp;---------         <br />&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;---&nbsp;&nbsp;dx^n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n!         <br />&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n=0         <br />&nbsp;&nbsp;//&nbsp;We&nbsp;use&nbsp;the&nbsp;Taylor&nbsp;series&nbsp;to&nbsp;compute&nbsp;cosine.&nbsp;&nbsp;We&nbsp;could&nbsp;use&nbsp;the&nbsp;Maclaurin         <br />&nbsp;&nbsp;//&nbsp;series,&nbsp;but&nbsp;this&nbsp;converges&nbsp;slowly&nbsp;at&nbsp;points&nbsp;close&nbsp;to&nbsp;pi.&nbsp;&nbsp;So&nbsp;we&nbsp;center         <br />&nbsp;&nbsp;//&nbsp;on&nbsp;one&nbsp;of&nbsp;four&nbsp;points:&nbsp;0,&nbsp;pi/2,&nbsp;pi,&nbsp;and&nbsp;3/2&nbsp;pi.&nbsp;&nbsp;This&nbsp;is&nbsp;done&nbsp;because&nbsp;the         <br />&nbsp;&nbsp;//&nbsp;nth&nbsp;derivative&nbsp;is&nbsp;easy&nbsp;to&nbsp;compute&nbsp;at&nbsp;these&nbsp;points:&nbsp;it&nbsp;simply&nbsp;alternates         <br />&nbsp;&nbsp;//&nbsp;between&nbsp;1,&nbsp;0&nbsp;and&nbsp;-1.&nbsp;&nbsp;Where&nbsp;it&nbsp;starts&nbsp;depends&nbsp;on&nbsp;what&nbsp;value&nbsp;the&nbsp;input&nbsp;is         <br />&nbsp;&nbsp;//&nbsp;closest&nbsp;to.         <br />&nbsp;&nbsp;//-----------------------------------         <br />         <br />&nbsp;&nbsp;//&nbsp;First,&nbsp;figure&nbsp;out&nbsp;which&nbsp;point&nbsp;the&nbsp;input&nbsp;value&nbsp;is&nbsp;closest&nbsp;to.         <br />&nbsp;&nbsp;//&nbsp;NOTE:&nbsp;Regular&nbsp;numbers&nbsp;used&nbsp;here,&nbsp;not&nbsp;BC&nbsp;numbers.&nbsp;&nbsp;No&nbsp;reason&nbsp;to&nbsp;be&nbsp;that         <br />&nbsp;&nbsp;//&nbsp;that&nbsp;accurate&nbsp;yet.         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$taylorIndex&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">0</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$taylorPoint&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">pi</span><span style="color: #FFFFFF">()&nbsp;*&nbsp;</span><span style="color: #FFFF00">7</span><span style="color: #FFFFFF">/</span><span style="color: #FFFF00">4</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$halfPi&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">pi</span><span style="color: #FFFFFF">()&nbsp;/&nbsp;</span><span style="color: #FFFF00">2</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;while&nbsp;(&nbsp;</span><span style="color: #FFFF00">$taylorPoint&nbsp;</span><span style="color: #FFFFFF">&gt;=&nbsp;</span><span style="color: #FFFF00">$x&nbsp;</span><span style="color: #FFFFFF">)         <br />&nbsp;&nbsp;{         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$taylorPoint&nbsp;</span><span style="color: #FFFFFF">-=&nbsp;</span><span style="color: #FFFF00">$halfPi</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$taylorIndex&nbsp;</span><span style="color: #FFFFFF">&#43;=&nbsp;</span><span style="color: #FFFF00">1</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;}         <br />         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Figure&nbsp;out&nbsp;what&nbsp;point&nbsp;we&nbsp;are&nbsp;starting.         <br />&nbsp;&nbsp;//&nbsp;Now&nbsp;the&nbsp;value&nbsp;is&nbsp;needed&nbsp;as&nbsp;a&nbsp;BC&nbsp;number.         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$taylorPoint&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">2&nbsp;</span><span style="color: #FFFFFF">-&nbsp;</span><span style="color: #FFFF00">$taylorIndex&nbsp;</span><span style="color: #FFFFFF">/&nbsp;</span><span style="color: #FFFF00">2</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$taylorPoint&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcmul</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$taylorPoint</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">bcpi</span><span style="color: #FFFFFF">()&nbsp;);         <br />         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;The&nbsp;index&nbsp;for&nbsp;what&nbsp;the&nbsp;nth&nbsp;derivative&nbsp;will&nbsp;be.         <br />&nbsp;&nbsp;//&nbsp;Note&nbsp;that&nbsp;$taylorIndex&nbsp;is&nbsp;subtracted&nbsp;by&nbsp;one&nbsp;in&nbsp;order&nbsp;to&nbsp;iterate&nbsp;it.&nbsp;&nbsp;This         <br />&nbsp;&nbsp;//&nbsp;is&nbsp;the&nbsp;same&nbsp;as&nbsp;adding&nbsp;3&nbsp;and&nbsp;doing&nbsp;a&nbsp;modulus&nbsp;by&nbsp;4.         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$taylorIndex&nbsp;</span><span style="color: #FFFFFF">%=&nbsp;</span><span style="color: #FFFF00">4</span><span style="color: #FFFFFF">;         <br />         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;To&nbsp;do&nbsp;sine&nbsp;rather&nbsp;than&nbsp;cosine,&nbsp;simply&nbsp;add&nbsp;one&nbsp;to&nbsp;the&nbsp;starting&nbsp;index.         <br />&nbsp;&nbsp;</span><span style="color: #FFFFFF">if&nbsp;(&nbsp;</span><span style="color: #FFFF00">$isSine&nbsp;</span><span style="color: #FFFFFF">)         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$taylorIndex&nbsp;</span><span style="color: #FFFFFF">=&nbsp;(&nbsp;</span><span style="color: #FFFF00">$taylorIndex&nbsp;</span><span style="color: #FFFFFF">&#43;&nbsp;</span><span style="color: #FFFF00">1&nbsp;</span><span style="color: #FFFFFF">)&nbsp;%&nbsp;</span><span style="color: #FFFF00">4</span><span style="color: #FFFFFF">;         <br />         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;This&nbsp;is&nbsp;a&nbsp;look-up&nbsp;table&nbsp;for&nbsp;the&nbsp;derivatives.         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$taylorIndexMap&nbsp;</span><span style="color: #FFFFFF">=&nbsp;array(&nbsp;</span><span style="color: #FFFF00">1</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">0</span><span style="color: #FFFFFF">,&nbsp;-</span><span style="color: #FFFF00">1</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">0&nbsp;</span><span style="color: #FFFFFF">);         <br />         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Setup&nbsp;the&nbsp;series&nbsp;variables.         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$x&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcsub</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$x</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$taylorPoint&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$power&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">1</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$newResult&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">0</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$result&nbsp;</span><span style="color: #FFFFFF">=&nbsp;-</span><span style="color: #FFFF00">1</span><span style="color: #FFFFFF">;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;&lt;-&nbsp;Something&nbsp;not&nbsp;equal&nbsp;to&nbsp;$newResult         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$n&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">0</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$fact&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">1</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;while&nbsp;(&nbsp;</span><span style="color: #FFFF00">bccomp</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$newResult</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$result&nbsp;</span><span style="color: #FFFFFF">)&nbsp;)         <br />&nbsp;&nbsp;{         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Get&nbsp;the&nbsp;nth&nbsp;derivative&nbsp;of&nbsp;the&nbsp;Taylor&nbsp;point.         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$derivative&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">$taylorIndexMap</span><span style="color: #FFFFFF">[&nbsp;</span><span style="color: #FFFF00">$taylorIndex&nbsp;</span><span style="color: #FFFFFF">];         <br />         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Don't&nbsp;bother&nbsp;doing&nbsp;any&nbsp;addition&nbsp;of&nbsp;derivative&nbsp;is&nbsp;zero.         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFFFF">if&nbsp;(&nbsp;</span><span style="color: #FFFF00">0&nbsp;</span><span style="color: #FFFFFF">!=&nbsp;</span><span style="color: #FFFF00">$derivative&nbsp;</span><span style="color: #FFFFFF">)         <br />&nbsp;&nbsp;&nbsp;&nbsp;{         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$result&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">$newResult</span><span style="color: #FFFFFF">;         <br />         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(&nbsp;-</span><span style="color: #FFFF00">1&nbsp;</span><span style="color: #FFFFFF">==&nbsp;</span><span style="color: #FFFF00">$derivative&nbsp;</span><span style="color: #FFFFFF">)         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$accumulator&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcneg</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$power&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$accumulator&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">$power</span><span style="color: #FFFFFF">;         <br />         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$accumulator&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcdiv</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$accumulator</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$fact&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$newResult&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcadd</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$result</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$accumulator&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;&nbsp;&nbsp;}         <br />         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$n&nbsp;</span><span style="color: #FFFFFF">&#43;=&nbsp;</span><span style="color: #FFFF00">1</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$power&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcmul</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$power</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$x&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$fact&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcmul</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$fact</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$n&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$taylorIndex&nbsp;</span><span style="color: #FFFFFF">=&nbsp;(&nbsp;</span><span style="color: #FFFF00">$taylorIndex&nbsp;</span><span style="color: #FFFFFF">&#43;&nbsp;</span><span style="color: #FFFF00">3&nbsp;</span><span style="color: #FFFFFF">)&nbsp;%&nbsp;</span><span style="color: #FFFF00">4</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;}         <br />         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Cut&nbsp;off&nbsp;the&nbsp;last&nbsp;few&nbsp;used&nbsp;to&nbsp;account&nbsp;for&nbsp;accumulated&nbsp;error--they&nbsp;are         <br />&nbsp;&nbsp;//&nbsp;incorrect&nbsp;anyway.         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$result&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcround</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$result</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$scale&nbsp;</span><span style="color: #FFFFFF">-&nbsp;</span><span style="color: #FFFF00">1&nbsp;</span><span style="color: #FFFFFF">);         <br />         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">bcscale</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$scale&nbsp;</span><span style="color: #FFFFFF">);         <br />         <br />&nbsp;&nbsp;return&nbsp;</span><span style="color: #FFFF00">$result</span><span style="color: #FFFFFF">;         <br />         <br />}         <br />         <br /></span><span style="color: #C0C0C0">/*         <br />&nbsp;*&nbsp;Computes&nbsp;cosine&nbsp;of&nbsp;x.         <br />&nbsp;*&nbsp;@author&nbsp;Andrew&nbsp;Que.         <br />&nbsp;*&nbsp;@license&nbsp;Public&nbsp;domain.         <br />&nbsp;*/         <br /></span><span style="color: #FFFFFF">function&nbsp;</span><span style="color: #FFFF00">bcsin</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$x&nbsp;</span><span style="color: #FFFFFF">)         <br />{         <br />&nbsp;&nbsp;return&nbsp;</span><span style="color: #FFFF00">bccos</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$x</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">true&nbsp;</span><span style="color: #FFFFFF">);         <br />}         <br />         <br /></span><span style="color: #C0C0C0">/*         <br />&nbsp;*&nbsp;Return&nbsp;the&nbsp;BC&nbsp;math&nbsp;scale.         <br />&nbsp;*         <br />&nbsp;*&nbsp;This&nbsp;function&nbsp;will&nbsp;return&nbsp;the&nbsp;last&nbsp;value&nbsp;passed&nbsp;to&nbsp;bcscale.         <br />&nbsp;*         <br />&nbsp;*&nbsp;@author&nbsp;Andrew&nbsp;Que.         <br />&nbsp;*&nbsp;@license&nbsp;Public&nbsp;domain.         <br />&nbsp;*/         <br /></span><span style="color: #FFFFFF">function&nbsp;</span><span style="color: #FFFF00">bcGetScale</span><span style="color: #FFFFFF">()         <br />{         <br />&nbsp;&nbsp;return&nbsp;</span><span style="color: #FFFF00">strlen</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">bcadd</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">0</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">0&nbsp;</span><span style="color: #FFFFFF">)&nbsp;)&nbsp;-&nbsp;</span><span style="color: #FFFF00">2</span><span style="color: #FFFFFF">;         <br />}         <br />         <br /></span><span style="color: #C0C0C0">/*         <br />&nbsp;*&nbsp;Rounds&nbsp;a&nbsp;value&nbsp;to&nbsp;the&nbsp;number&nbsp;of&nbsp;places&nbsp;requested.         <br />&nbsp;*&nbsp;@author&nbsp;Andrew&nbsp;Que.         <br />&nbsp;*&nbsp;@license&nbsp;Public&nbsp;domain.         <br />&nbsp;*/         <br /></span><span style="color: #FFFFFF">function&nbsp;</span><span style="color: #FFFF00">bcRound</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$value</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$places&nbsp;</span><span style="color: #FFFFFF">)         <br />{         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Round&nbsp;result&nbsp;by&nbsp;adding&nbsp;5x10^(-places).         <br />&nbsp;&nbsp;</span><span style="color: #FFFFFF">if&nbsp;(&nbsp;-</span><span style="color: #FFFF00">1&nbsp;</span><span style="color: #FFFFFF">==&nbsp;</span><span style="color: #FFFF00">bccomp</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$value</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #00FFFF">&quot;0&quot;&nbsp;</span><span style="color: #FFFFFF">)&nbsp;)         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$value&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcadd</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$value</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #00FFFF">&quot;-0.&quot;&nbsp;</span><span style="color: #FFFFFF">.&nbsp;</span><span style="color: #FFFF00">str_pad</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #00FFFF">&quot;&quot;</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$places</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #00FFFF">&quot;0&quot;&nbsp;</span><span style="color: #FFFFFF">)&nbsp;.&nbsp;</span><span style="color: #00FFFF">&quot;5&quot;&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;else         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$value&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcadd</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$value</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #00FFFF">&quot;0.&quot;&nbsp;</span><span style="color: #FFFFFF">.&nbsp;</span><span style="color: #FFFF00">str_pad</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #00FFFF">&quot;&quot;</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$places</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #00FFFF">&quot;0&quot;&nbsp;</span><span style="color: #FFFFFF">)&nbsp;.&nbsp;</span><span style="color: #00FFFF">&quot;5&quot;&nbsp;</span><span style="color: #FFFFFF">);         <br />         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Split&nbsp;number&nbsp;into&nbsp;the&nbsp;whole&nbsp;and&nbsp;fractional&nbsp;parts.         <br />&nbsp;&nbsp;</span><span style="color: #FFFFFF">list(&nbsp;</span><span style="color: #FFFF00">$integer</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$fractional&nbsp;</span><span style="color: #FFFFFF">)&nbsp;=&nbsp;</span><span style="color: #FFFF00">explode</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #00FFFF">&quot;.&quot;</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$value&nbsp;</span><span style="color: #FFFFFF">);         <br />         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;If&nbsp;are&nbsp;result&nbsp;uses&nbsp;all&nbsp;the&nbsp;digits,&nbsp;cut&nbsp;off&nbsp;the&nbsp;last&nbsp;few&nbsp;used&nbsp;to&nbsp;account         <br />&nbsp;&nbsp;//&nbsp;for&nbsp;rounding&nbsp;error--they&nbsp;are&nbsp;incorrect&nbsp;anyway.         <br />&nbsp;&nbsp;</span><span style="color: #FFFFFF">if&nbsp;(&nbsp;</span><span style="color: #FFFF00">strlen</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$fractional&nbsp;</span><span style="color: #FFFFFF">)&nbsp;&gt;&nbsp;</span><span style="color: #FFFF00">$places&nbsp;</span><span style="color: #FFFFFF">)         <br />&nbsp;&nbsp;{         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$fractional&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">substr</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$fractional</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">0</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$places&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$value&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">$integer&nbsp;</span><span style="color: #FFFFFF">.&nbsp;</span><span style="color: #00FFFF">&quot;.&quot;&nbsp;</span><span style="color: #FFFFFF">.&nbsp;</span><span style="color: #FFFF00">$fractional</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;}         <br />         <br />&nbsp;&nbsp;return&nbsp;</span><span style="color: #FFFF00">$value</span><span style="color: #FFFFFF">;         <br />}         <br />         <br /></span><span style="color: #C0C0C0">/*         <br />&nbsp;*&nbsp;Negate&nbsp;value.         <br />&nbsp;*&nbsp;@author&nbsp;Andrew&nbsp;Que.         <br />&nbsp;*&nbsp;@license&nbsp;Public&nbsp;domain.         <br />&nbsp;*/         <br /></span><span style="color: #FFFFFF">function&nbsp;</span><span style="color: #FFFF00">bcneg</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$value&nbsp;</span><span style="color: #FFFFFF">)         <br />{         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Already&nbsp;negative?         <br />&nbsp;&nbsp;</span><span style="color: #FFFFFF">if&nbsp;(&nbsp;</span><span style="color: #00FFFF">'-'&nbsp;</span><span style="color: #FFFFFF">==&nbsp;</span><span style="color: #FFFF00">$value</span><span style="color: #FFFFFF">[&nbsp;</span><span style="color: #FFFF00">0&nbsp;</span><span style="color: #FFFFFF">]&nbsp;)         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$value&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">substr</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$value</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">1&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;else         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$value&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #00FFFF">&quot;-</span><span style="color: #FFFF00">$value</span><span style="color: #00FFFF">&quot;</span><span style="color: #FFFFFF">;         <br />         <br />&nbsp;&nbsp;return&nbsp;</span><span style="color: #FFFF00">$value</span><span style="color: #FFFFFF">;         <br />}         <br />         <br /></span><span style="color: #C0C0C0">/*         <br />&nbsp;*&nbsp;Computes&nbsp;constant&nbsp;pi.         <br />&nbsp;*         <br />&nbsp;*&nbsp;Implementation&nbsp;uses&nbsp;Spigot&nbsp;algorithms.&nbsp;&nbsp;Should&nbsp;converge&nbsp;rapidly.         <br />&nbsp;*&nbsp;Verified&nbsp;to&nbsp;1000&nbsp;decimal&nbsp;places.         <br />&nbsp;*         <br />&nbsp;*&nbsp;@author&nbsp;Andrew&nbsp;Que.         <br />&nbsp;*&nbsp;@license&nbsp;Public&nbsp;domain.         <br />&nbsp;*/         <br /></span><span style="color: #FFFFFF">function&nbsp;</span><span style="color: #FFFF00">bcpi</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$desiredScale&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">0&nbsp;</span><span style="color: #FFFFFF">)         <br />{         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Cache&nbsp;value&nbsp;of&nbsp;Pi&nbsp;so&nbsp;it&nbsp;is&nbsp;not&nbsp;recalculated&nbsp;if&nbsp;the&nbsp;scale&nbsp;isn't&nbsp;changed.         <br />&nbsp;&nbsp;</span><span style="color: #FFFFFF">static&nbsp;</span><span style="color: #FFFF00">$pi&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">NAN</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;static&nbsp;</span><span style="color: #FFFF00">$piScale&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">0</span><span style="color: #FFFFFF">;         <br />         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Turn&nbsp;up&nbsp;the&nbsp;scale&nbsp;for&nbsp;the&nbsp;duration&nbsp;of&nbsp;this&nbsp;function&nbsp;to&nbsp;avoid&nbsp;rounding         <br />&nbsp;&nbsp;//&nbsp;error.         <br />&nbsp;&nbsp;</span><span style="color: #FFFF00">$scale&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcGetScale</span><span style="color: #FFFFFF">();         <br />         <br />&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;Has&nbsp;the&nbsp;scale&nbsp;increased?         <br />&nbsp;&nbsp;</span><span style="color: #FFFFFF">if&nbsp;(&nbsp;(&nbsp;</span><span style="color: #FFFF00">$scale&nbsp;</span><span style="color: #FFFFFF">&gt;&nbsp;</span><span style="color: #FFFF00">$piScale&nbsp;</span><span style="color: #FFFFFF">)         <br />&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;(&nbsp;</span><span style="color: #FFFF00">$desiredScale&nbsp;</span><span style="color: #FFFFFF">&gt;&nbsp;</span><span style="color: #FFFF00">$piScale&nbsp;</span><span style="color: #FFFFFF">)&nbsp;)         <br />&nbsp;&nbsp;{         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$piScale&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">max</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$desiredScale</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$scale&nbsp;</span><span style="color: #FFFFFF">);         <br />         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;$$$FUTURE&nbsp;-&nbsp;Arbitrary.&nbsp;&nbsp;Test&nbsp;and&nbsp;determine&nbsp;what&nbsp;is&nbsp;actually&nbsp;needed.         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">bcscale</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$piScale&nbsp;</span><span style="color: #FFFFFF">&#43;&nbsp;</span><span style="color: #FFFF00">5&nbsp;</span><span style="color: #FFFFFF">);         <br />         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$index&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">0</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$newResult&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">0</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$result&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFFFF">=&nbsp;-</span><span style="color: #FFFF00">1</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;(&nbsp;</span><span style="color: #FFFF00">bccomp</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$newResult</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$result&nbsp;</span><span style="color: #FFFFFF">)&nbsp;)         <br />&nbsp;&nbsp;&nbsp;&nbsp;{         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$result&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">$newResult</span><span style="color: #FFFFFF">;         <br />         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$accumulator&nbsp;</span><span style="color: #FFFFFF">=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">bcdiv</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">4</span><span style="color: #FFFFFF">,&nbsp;(&nbsp;</span><span style="color: #FFFF00">8&nbsp;</span><span style="color: #FFFFFF">*&nbsp;</span><span style="color: #FFFF00">$index&nbsp;</span><span style="color: #FFFFFF">&#43;&nbsp;</span><span style="color: #FFFF00">1&nbsp;</span><span style="color: #FFFFFF">)&nbsp;);         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$accumulator&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcsub</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$accumulator</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">bcdiv</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">2</span><span style="color: #FFFFFF">,&nbsp;(&nbsp;</span><span style="color: #FFFF00">8&nbsp;</span><span style="color: #FFFFFF">*&nbsp;</span><span style="color: #FFFF00">$index&nbsp;</span><span style="color: #FFFFFF">&#43;&nbsp;</span><span style="color: #FFFF00">4&nbsp;</span><span style="color: #FFFFFF">)&nbsp;)&nbsp;);         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$accumulator&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcsub</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$accumulator</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">bcdiv</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">1</span><span style="color: #FFFFFF">,&nbsp;(&nbsp;</span><span style="color: #FFFF00">8&nbsp;</span><span style="color: #FFFFFF">*&nbsp;</span><span style="color: #FFFF00">$index&nbsp;</span><span style="color: #FFFFFF">&#43;&nbsp;</span><span style="color: #FFFF00">5&nbsp;</span><span style="color: #FFFFFF">)&nbsp;)&nbsp;);         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$accumulator&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcsub</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$accumulator</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">bcdiv</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">1</span><span style="color: #FFFFFF">,&nbsp;(&nbsp;</span><span style="color: #FFFF00">8&nbsp;</span><span style="color: #FFFFFF">*&nbsp;</span><span style="color: #FFFF00">$index&nbsp;</span><span style="color: #FFFFFF">&#43;&nbsp;</span><span style="color: #FFFF00">6&nbsp;</span><span style="color: #FFFFFF">)&nbsp;)&nbsp;);         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$accumulator&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcmul</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$accumulator</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">bcdiv</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">1</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">bcpow</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">16</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$index&nbsp;</span><span style="color: #FFFFFF">)&nbsp;)&nbsp;);         <br />         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$newResult&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">bcadd</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$newResult</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$accumulator&nbsp;</span><span style="color: #FFFFFF">);         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$index&nbsp;</span><span style="color: #FFFFFF">&#43;=&nbsp;</span><span style="color: #FFFF00">1</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;&nbsp;&nbsp;}         <br />         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #C0C0C0">//&nbsp;If&nbsp;are&nbsp;result&nbsp;uses&nbsp;all&nbsp;the&nbsp;digits,&nbsp;cut&nbsp;off&nbsp;the&nbsp;last&nbsp;few&nbsp;used&nbsp;to&nbsp;account         <br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;for&nbsp;rounding&nbsp;error--they&nbsp;are&nbsp;incorrect&nbsp;anyway.         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFFFF">if&nbsp;(&nbsp;</span><span style="color: #FFFF00">strlen</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$result&nbsp;</span><span style="color: #FFFFFF">)&nbsp;&gt;&nbsp;</span><span style="color: #FFFF00">$piScale&nbsp;</span><span style="color: #FFFFFF">)         <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$result&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">substr</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$result</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">0</span><span style="color: #FFFFFF">,&nbsp;</span><span style="color: #FFFF00">$piScale&nbsp;</span><span style="color: #FFFFFF">);         <br />         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">bcscale</span><span style="color: #FFFFFF">(&nbsp;</span><span style="color: #FFFF00">$scale&nbsp;</span><span style="color: #FFFFFF">);         <br />         <br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FFFF00">$pi&nbsp;</span><span style="color: #FFFFFF">=&nbsp;</span><span style="color: #FFFF00">$result</span><span style="color: #FFFFFF">;         <br />&nbsp;&nbsp;}         <br />         <br />&nbsp;&nbsp;return&nbsp;</span><span style="color: #FFFF00">$pi</span><span style="color: #FFFFFF">;         <br />}</span>       </div>     </div>        <p class="Main">       The       very first step is to get the input into a suitable range. This can       be done quickly using the <a href="http://en.wikipedia.org/wiki/Modulo_operation">modulo operation</a>       which represents how much is left over after an integer division has been       preformed.     </p>     <p align="center">       <img width="130" height="42" style="background: white" src="/Public/2013-06-01/CosineTaylorseries_html_2eda58b6.gif" alt="" />     </p>     <p class="Main">       This       is used to put the input into the &plusmn;2&pi;       range. All trigonometric functions repeat themselves in       this period, so it makes sense simply to narrow the input down to this       range.     </p>     <p align="center">       <img width="283" height="42" style="background: white" src="/Public/2013-06-01/CosineTaylorseries_html_m35aa8cef.gif" alt="" />     </p>     <p class="Main">       Then       the closest <em>b</em> point       must be chosen. This is done starting at 7/4 &pi; and       dropping by &pi;/2 increments if the current value is greater than the       input value. The 7/4 &pi;       = 2&pi;       &ndash; &pi;/4 because       we are looking for a cutoff point midway between 2&pi;       and 3/2 &pi;.       Subtracting by &pi;/2 each       time because our <em>b</em> points       are separated by &pi;/2. The       number of subtractions are counted. In this way, <em>b</em> can be       calculated. If <em>n</em>       subtractions were made, then <em>b</em> = 2&pi;       &ndash; &pi;<em>n</em>/2 =       &pi;(2 &ndash;       <em>n</em>/2).      </p>     <p class="Main">       The       next part is the derivative table.     </p>     <p align="center">       <img width="249" height="115" style="background: white" src="/Public/2013-06-01/CosineTaylorseries_html_569f687b.gif" alt="" />     </p>     <p class="Main">       The       cells in the columns represent the function of the in the top row where       <em>x</em> is the       value in the row's left most column. Notice how the values simply shift to       the left on each subsequent row, and the       table repeats every 4 rows. So the number of subtractions used above to       calculate <em>b</em> can be       used as a starting index into this table.     </p>     <p class="Main">       Now       the summation loop itself. Recall the Taylor series summation:     </p>     <p align="center">       <img width="182" height="43" style="background: white" src="/Public/2013-06-01/CosineTaylorseries_html_m5d815c23.gif" alt="" />     </p>     <p class="Main">       We know       that cos<sup>(</sup><sup><em>n</em></sup><sup>)</sup>( <em>b</em> ) is       just the one of       the values from the derivative       table. Calculating <em>n</em>! in the       loop is also easy,       because <em>a</em><sub><em>n</em></sub>! =       <em>a</em><sub><em>n</em></sub><em> * a</em><sub><em>n</em></sub><sub>-1</sub> where       <em>a</em><sub>0</sub> = 1. The       same kind of trick can be used for       (<em>x</em> &ndash;       <em>b</em>)<sup><em>n</em></sup>. Here       <em>p</em><sub><em>n</em></sub> = (<em>x - b) * p</em><sub><em>n</em></sub><sub>-1</sub>. That makes the       loop itself small and simple.     </p>     <p class="Main">       The       very last trick employed in the code is for computing sine. Cosine and       sine are 90&ordm; out of phase. Simply by starting at the next location in       the derivative table, the exact       same code for cosine can be used for sine.     </p>     <p class="Main">       I       found an interesting side-effect that took       a while to trace down. The       resolution for the cosine operation is increased to account for rounding       error during the function. This can result in it's own rounding error. The       easiest example is cos( 2/3 &pi;       ). The correct answer is -0.5. However, we can       not exactly calculate Pi to an infinite number of places. So the function       is always passed some approximate of Pi which results in something like       cos( 2/3 * 3.14159 ) =       -0.499998467&middot;&middot;&middot;. For a more accurate       representation of Pi, the more decimal places until the calculation stops       being 9. For cos( 2/3 * 3.1415926535 ) = -0.4999999999481578&middot;&middot;&middot;. But       the answer will only ever equal -0.5 when exactly 2/3 Pi is used. The only       way I found to get around this is to per-calculate Pi to greater precision       then necessary, and that does get rid of the round errors. By using 10       decimal digits of Pi, we can expect 9 digits of cosine. Then rounding       after 9 digits results in cos( 2/3 * 3.1415926535 ) = -0.5 and that is       what we're looking for.     </p>     <p class="Main">       Tests show that the average speed improvement of almost 240 times using       the Taylor series method over the straight Maclaurin series. The function       is now as fast as the others I implemented. I have to give a shout out to       my calculus professor, <a href="http://www.rock.uwc.edu/aboutus/directory/directory_detail.asp?ID=71">Dr.       Stredulinsky</a> who       taught me Taylor series, and an other to my discrete math and differential       equations professor <a href="http://www.rock.uwc.edu/aboutus/directory/directory_detail.asp?ID=7">Dr.       Fuller</a>. These two professors have really made a difference in my       understanding of mathematics. I didn't       just learn the subjects to pass a test&mdash;I understood the subjects       enough to apply them here.     </p>
                        </td>
                      </tr>
                      <tr>
                        <td>
                          <table width="100%" cellpadding="0" cellspacing="0">
                            <tr>
                              <td align="center">
                                <table class="CommentTableBody" width="98%">
                                  <tr>
                                    <td class="CommentTableCell">
                                      1 comment has been made
                                    </td>
                                  </tr>
                                  <tr>
                                    <td class="CommentTableCell">
                                      <b>From </b><br/>
                                      <small>
                                        June 3rd, 2013 at 10:37AM
                                      </small>
                                      <br />

                                        <table width="100%">
                                          <tr>
                                            <td class="CommentTableSubCell">
                                              &nbsp;&nbsp;&nbsp;Interesting, keep the mind sharp and some fast &quot;fun&quot; with PHP.  BTW - happy birthday!  Indulge in some sushi today.<br />
                                            </td>
                                          </tr>
                                        </table>

                                      </td>
                                    </tr>
                                    <tr>
                                      <td class="CommentTableCell"> 
                                        <div style="text-align: center">
                                          <a href="http://www.DrQue.net/index.php?ArticleNumber=2652&amp;CommentArticle=2652#_2652" >
                                            + Add a comment
                                          </a>
                                        </div>
                                      </td>
                                    </tr>
                                  </table>
                                </td>
                              </tr>
                            </table>
                          </td>
                        </tr>
                      </table>

]]>                        </content:encoded>
                        <dc:subject>Daily photos</dc:subject>
                        <dc:date>2013-06-01T10:06:15Z</dc:date>
                      </item>
                        <item>
                          <title>05/31/2013</title>
                          <link>http://www.DrQue.net/index.php?ArticleNumber=2651#_2651</link>
                          <description>05/31/2013</description>
                          <content:encoded>
<![CDATA[
                      <table border="0" cellpadding="0" cellspacing="2">
                        <tr>
                          <td>
                            <table border="0" style="float: left; margin: 5px;" cellpadding="0" cellspacing="0">
                              <tr>

                                <td>
                                  <img src="http://www.DrQue.net/Gallery/2013_05_26/300x300/127.jpg" style="border: 0px" alt="" />
                                </td>

                              </tr>
                              <tr>

                                <td align="center">
                                  <table width="100%" cellpadding="0" cellspacing="0">
                                    <tr>
                                      <td align="center">
                                        <table style="margin-top: 4px">
                                          <tr>
                                            <td>
                                              <small>
                                                (<a href="http://www.DrQue.net//Gallery/" onclick="window.open(this.href,'_blank');return false;">Gallery</a>)
                                              </small>
                                              <small>
                                                (<a href="http://www.DrQue.net//Computers/" onclick="window.open(this.href,'_blank');return false;">Computers</a>)
                                              </small>
                                              <small>
                                                (<a href="http://www.DrQue.net//Includes/" onclick="window.open(this.href,'_blank');return false;">Includes</a>)
                                              </small>
<br />                                              <small>
                                                (<a href="http://www.DrQue.net//Proxy/" onclick="window.open(this.href,'_blank');return false;">Proxy</a>)
                                              </small>
                                              <small>
                                                (<a href="http://www.DrQue.net//NewsAdmin/" onclick="window.open(this.href,'_blank');return false;">NewsAdmin</a>)
                                              </small>
                                              <small>
                                                (<a href="http://www.DrQue.net//Images/" onclick="window.open(this.href,'_blank');return false;">Images</a>)
                                              </small>
<br />                                              <small>
                                                (<a href="http://www.DrQue.net//Temp/" onclick="window.open(this.href,'_blank');return false;">Temp</a>)
                                              </small>
                                              <small>
                                                (<a href="http://www.DrQue.net//Public/" onclick="window.open(this.href,'_blank');return false;">Public</a>)
                                              </small>
                                              <small>
                                                (<a href="http://www.DrQue.net//Templates/" onclick="window.open(this.href,'_blank');return false;">Templates</a>)
                                              </small>
<br />                                              <small>
                                                (<a href="http://www.DrQue.net//freecap/" onclick="window.open(this.href,'_blank');return false;">freecap</a>)
                                              </small>
                                              <small>
                                                (<a href="http://www.DrQue.net//Utilities/" onclick="window.open(this.href,'_blank');return false;">Utilities</a>)
                                              </small>
                                              <small>
                                                (<a href="http://www.DrQue.net//Stories/" onclick="window.open(this.href,'_blank');return false;">Stories</a>)
                                              </small>
<br />                                              <small>
                                                (<a href="http://www.DrQue.net//PublicLogs/" onclick="window.open(this.href,'_blank');return false;">PublicLogs</a>)
                                              </small>
                                              <small>
                                                (<a href="http://www.DrQue.net//GalleryNew/" onclick="window.open(this.href,'_blank');return false;">GalleryNew</a>)
                                              </small>
                                              <small>
                                                (<a href="http://www.DrQue.net//Code/" onclick="window.open(this.href,'_blank');return false;">Code</a>)
                                              </small>
<br />                                            </td>
                                          </tr>
                                        </table>
                                      </td>
                                    </tr>
                                  </table>
                                </td>

                              </tr>
                            </table>
                            &nbsp;&nbsp; Ben standing in a sea of bizarre firearms at House on the Rock.
                          </td>
                        </tr>
                        <tr>
                          <td>
                            <table width="100%" cellpadding="0" cellspacing="0">
                              <tr>
                                <td align="center">
                                  <table class="CommentTableBody" width="98%">
                                    <tr>
                                      <td class="CommentTableCell"> 
                                        <div style="text-align: center">No comments have been added </div>
                                        </td>
                                      </tr>
                                      <tr>
                                        <td class="CommentTableCell"> 
                                          <div style="text-align: center">
                                            <a href="http://www.DrQue.net/index.php?ArticleNumber=2651&amp;CommentArticle=2651#_2651" >
                                              + Add a comment
                                            </a>
                                          </div>
                                        </td>
                                      </tr>
                                    </table>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>

]]>                          </content:encoded>
                          <dc:subject>Daily photos</dc:subject>
                          <dc:date>2013-05-31T05:05:52Z</dc:date>
                        </item>
                          <item>
                            <title>05/30/2013</title>
                            <link>http://www.DrQue.net/index.php?ArticleNumber=2650#_2650</link>
                            <description>05/30/2013</description>
                            <content:encoded>
<![CDATA[
                        <table border="0" cellpadding="0" cellspacing="2">
                          <tr>
                            <td>
                              <table border="0" style="float: left; margin: 5px;" cellpadding="0" cellspacing="0">
                                <tr>

                                  <td>
                                    <img src="http://www.DrQue.net/Gallery/2013_05_26/300x300/131.jpg" style="border: 0px" alt="" />
                                  </td>

                                </tr>
                                <tr>

                                  <td align="center">
                                    <table width="100%" cellpadding="0" cellspacing="0">
                                      <tr>
                                        <td align="center">
                                          <table style="margin-top: 4px">
                                            <tr>
                                              <td>
                                                <small>
                                                  (<a href="http://www.DrQue.net//Gallery/" onclick="window.open(this.href,'_blank');return false;">Gallery</a>)
                                                </small>
                                                <small>
                                                  (<a href="http://www.DrQue.net//Computers/" onclick="window.open(this.href,'_blank');return false;">Computers</a>)
                                                </small>
                                                <small>
                                                  (<a href="http://www.DrQue.net//Includes/" onclick="window.open(this.href,'_blank');return false;">Includes</a>)
                                                </small>
<br />                                                <small>
                                                  (<a href="http://www.DrQue.net//Proxy/" onclick="window.open(this.href,'_blank');return false;">Proxy</a>)
                                                </small>
                                                <small>
                                                  (<a href="http://www.DrQue.net//NewsAdmin/" onclick="window.open(this.href,'_blank');return false;">NewsAdmin</a>)
                                                </small>
                                                <small>
                                                  (<a href="http://www.DrQue.net//Images/" onclick="window.open(this.href,'_blank');return false;">Images</a>)
                                                </small>
<br />                                                <small>
                                                  (<a href="http://www.DrQue.net//Temp/" onclick="window.open(this.href,'_blank');return false;">Temp</a>)
                                                </small>
                                                <small>
                                                  (<a href="http://www.DrQue.net//Public/" onclick="window.open(this.href,'_blank');return false;">Public</a>)
                                                </small>
                                                <small>
                                                  (<a href="http://www.DrQue.net//Templates/" onclick="window.open(this.href,'_blank');return false;">Templates</a>)
                                                </small>
<br />                                                <small>
                                                  (<a href="http://www.DrQue.net//freecap/" onclick="window.open(this.href,'_blank');return false;">freecap</a>)
                                                </small>
                                                <small>
                                                  (<a href="http://www.DrQue.net//Utilities/" onclick="window.open(this.href,'_blank');return false;">Utilities</a>)
                                                </small>
                                                <small>
                                                  (<a href="http://www.DrQue.net//Stories/" onclick="window.open(this.href,'_blank');return false;">Stories</a>)
                                                </small>
<br />                                                <small>
                                                  (<a href="http://www.DrQue.net//PublicLogs/" onclick="window.open(this.href,'_blank');return false;">PublicLogs</a>)
                                                </small>
                                                <small>
                                                  (<a href="http://www.DrQue.net//GalleryNew/" onclick="window.open(this.href,'_blank');return false;">GalleryNew</a>)
                                                </small>
                                                <small>
                                                  (<a href="http://www.DrQue.net//Code/" onclick="window.open(this.href,'_blank');return false;">Code</a>)
                                                </small>
<br />                                              </td>
                                            </tr>
                                          </table>
                                        </td>
                                      </tr>
                                    </table>
                                  </td>

                                </tr>
                              </table>
                              &nbsp;&nbsp; The Ivory City at House on the Rock.
                            </td>
                          </tr>
                          <tr>
                            <td>
                              <table width="100%" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td align="center">
                                    <table class="CommentTableBody" width="98%">
                                      <tr>
                                        <td class="CommentTableCell"> 
                                          <div style="text-align: center">No comments have been added </div>
                                          </td>
                                        </tr>
                                        <tr>
                                          <td class="CommentTableCell"> 
                                            <div style="text-align: center">
                                              <a href="http://www.DrQue.net/index.php?ArticleNumber=2650&amp;CommentArticle=2650#_2650" >
                                                + Add a comment
                                              </a>
                                            </div>
                                          </td>
                                        </tr>
                                      </table>
                                    </td>
                                  </tr>
                                </table>
                              </td>
                            </tr>
                          </table>

]]>                            </content:encoded>
                            <dc:subject>Daily photos</dc:subject>
                            <dc:date>2013-05-30T05:05:52Z</dc:date>
                          </item>
                        </channel>
                      </rss>
