{"id":1208,"date":"2015-11-02T20:24:29","date_gmt":"2015-11-02T20:24:29","guid":{"rendered":"http:\/\/www.sydneysmith.com\/wordpress\/?p=1208"},"modified":"2017-05-14T01:44:02","modified_gmt":"2017-05-14T01:44:02","slug":"hp67-h-pi","status":"publish","type":"post","link":"https:\/\/www.sydneysmith.com\/wordpress\/1208\/hp67-h-pi\/","title":{"rendered":"HP67 h PI"},"content":{"rendered":"<p>The HP67 stores PI\/4 in ROM subroutine 05043 with 13 digit precision. It multiplies that by 4 (&#8220;c + c -&gt; c[w]&#8221; twice) to get 3.1415926535900 and then rounds that to 3.141592654.<br \/>\nIt works like this:<br \/>\n<!--more--><\/p>\n<pre>\r\nHP67 Logging started.\r\n\r\n(00167 - 00213 wait loop)\r\n[h]\r\n...\r\n\r\n(00167 - 00213 wait loop)\r\n[PI]\r\n00214 display off\r\n00215 b exchange c[w]\r\n00216 CRC 400\r\n00217 keys to a\r\n...\r\n00252 delayed rom 01\r\n00253 a -&gt; rom address\r\n00537 if n\/c go to 0427\r\n00427 ...\r\n00435 if n\/c go to 0542\r\n00542 ...\r\n00544 if n\/c go to 0436\r\n00436 ...\r\n00442 jsb 01205            ; clear s 4,6-8,10,13\r\n00443 ...\r\n00446 if n\/c go to 06021\r\n06021 ...\r\n06027 a -&gt; rom address \r\n06004 if n\/c go to 06046\r\n06046 ...\r\n06051 a -&gt; rom address \r\n07110 if n\/c go to 07172\r\n07172 ...\r\n07173 delayed rom 012 \r\n07174 jsb 05043\r\n.05043 p &lt;- 12 \r\n.05044 0 -&gt; c[w] \r\n.05045 load constant 7 \r\n.05046 load constant 8 \r\n.05047 load constant 5 \r\n.05050 load constant 3 \r\n.05051 load constant 9 \r\n.05052 load constant 8 \r\n.05053 load constant 1 \r\n.05054 load constant 6 \r\n.05055 load constant 3 \r\n.05056 load constant 3 \r\n.05057 load constant 9 \r\n.05060 load constant 7 \r\n.05061 load constant 5    ; C=07853981633975\r\n.05062 p &lt;- 12 \r\n.05063 return \r\n07175 c + c -&gt; c[w]       ; C=15707963267950\r\n07176 c + c -&gt; c[w]       ; C=31415926535900\r\n07177 shift right c[w]    ; C=03141592653590\r\n07200 c + 1 -&gt; c[m]       ; C=03141592654590\r\n07201 0 -&gt; c[x]           ; C=03141592654000\r\n07202 if n\/c go to 07372\r\n07372 delayed rom 00 \r\n07373 if n\/c go to 0103\r\n00103 ...\r\n00110 then go to 0114\r\n00114 ...\r\n00115 if n\/c go to 0124\r\n00124 ...\r\n00156 jsb 02007           ; A=03140000000000\r\n00157 delayed rom 02\r\n00160 jsb 01162           ; A=3014fffffff100 B=03000000000022\r\n00161 hi im woodstock\r\n00162 display off\r\n00163 display toggle      ; \"3.14\"\r\n00164 0 -&gt; s 15\r\n00165 if 1 = s 15\r\n00166 then go to 0164\r\n\r\n(00167 - 00213 wait loop)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The HP67 stores PI\/4 in ROM subroutine 05043 with 13 digit precision. It multiplies that by 4 (&#8220;c + c -&gt; c[w]&#8221; twice) to get 3.1415926535900 and then rounds that to 3.141592654. It works like this:<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,5,3],"tags":[33,32],"_links":{"self":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1208"}],"collection":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1208"}],"version-history":[{"count":7,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1208\/revisions"}],"predecessor-version":[{"id":1351,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/posts\/1208\/revisions\/1351"}],"wp:attachment":[{"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sydneysmith.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}