long-decimal 0.00.20 → 0.00.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. data/README +32 -31
  2. data/Rakefile +1 -1
  3. data/VERSION +1 -1
  4. data/doc/classes/LongDecimal.src/M000088.html +1 -1
  5. data/doc/classes/LongDecimal.src/M000089.html +1 -1
  6. data/doc/classes/LongDecimal.src/M000090.html +1 -1
  7. data/doc/classes/LongDecimal.src/M000091.html +1 -1
  8. data/doc/classes/LongDecimal.src/M000092.html +1 -1
  9. data/doc/classes/LongDecimal.src/M000093.html +1 -1
  10. data/doc/classes/LongDecimal.src/M000096.html +1 -1
  11. data/doc/classes/LongDecimal.src/M000097.html +1 -1
  12. data/doc/classes/LongDecimal.src/M000098.html +1 -1
  13. data/doc/classes/LongDecimal.src/M000099.html +1 -1
  14. data/doc/classes/LongDecimal.src/M000100.html +1 -1
  15. data/doc/classes/LongDecimal.src/M000101.html +1 -1
  16. data/doc/classes/LongDecimalBase.html +53 -53
  17. data/doc/classes/LongDecimalBase.src/M000105.html +4 -4
  18. data/doc/classes/LongDecimalBase.src/M000106.html +4 -4
  19. data/doc/classes/LongDecimalBase.src/M000107.html +4 -4
  20. data/doc/classes/LongDecimalBase.src/M000108.html +4 -4
  21. data/doc/classes/LongDecimalBase.src/M000109.html +4 -4
  22. data/doc/classes/LongDecimalBase.src/M000110.html +4 -9
  23. data/doc/classes/LongDecimalBase.src/M000113.html +9 -5
  24. data/doc/classes/LongDecimalBase.src/M000114.html +5 -4
  25. data/doc/classes/LongDecimalQuot.src/M000003.html +1 -1
  26. data/doc/classes/LongDecimalQuot.src/M000004.html +1 -1
  27. data/doc/classes/LongDecimalQuot.src/M000005.html +1 -1
  28. data/doc/classes/LongDecimalQuot.src/M000006.html +1 -1
  29. data/doc/classes/LongDecimalQuot.src/M000007.html +1 -1
  30. data/doc/classes/LongDecimalQuot.src/M000008.html +1 -1
  31. data/doc/classes/LongDecimalQuot.src/M000009.html +1 -1
  32. data/doc/classes/LongDecimalQuot.src/M000010.html +1 -1
  33. data/doc/classes/LongDecimalQuot.src/M000011.html +1 -1
  34. data/doc/classes/LongDecimalQuot.src/M000012.html +1 -1
  35. data/doc/classes/LongDecimalQuot.src/M000013.html +1 -1
  36. data/doc/classes/LongDecimalQuot.src/M000014.html +1 -1
  37. data/doc/classes/LongDecimalQuot.src/M000015.html +1 -1
  38. data/doc/classes/LongDecimalQuot.src/M000016.html +1 -1
  39. data/doc/classes/LongDecimalQuot.src/M000017.html +1 -1
  40. data/doc/classes/LongDecimalQuot.src/M000018.html +1 -1
  41. data/doc/classes/LongDecimalQuot.src/M000019.html +1 -1
  42. data/doc/classes/LongDecimalQuot.src/M000020.html +1 -1
  43. data/doc/classes/LongDecimalQuot.src/M000021.html +1 -1
  44. data/doc/classes/LongDecimalQuot.src/M000022.html +1 -1
  45. data/doc/classes/LongDecimalQuot.src/M000023.html +1 -1
  46. data/doc/classes/LongDecimalQuot.src/M000024.html +1 -1
  47. data/doc/classes/LongDecimalQuot.src/M000025.html +1 -1
  48. data/doc/classes/LongDecimalQuot.src/M000026.html +1 -1
  49. data/doc/classes/LongDecimalQuot.src/M000027.html +1 -1
  50. data/doc/classes/LongDecimalQuot.src/M000028.html +1 -1
  51. data/doc/classes/LongDecimalQuot.src/M000029.html +1 -1
  52. data/doc/classes/LongDecimalQuot.src/M000032.html +1 -1
  53. data/doc/classes/LongDecimalQuot.src/M000033.html +1 -1
  54. data/doc/classes/LongDecimalRoundingMode/RoundingModeClass.html +10 -10
  55. data/doc/classes/LongMath.html +170 -151
  56. data/doc/classes/LongMath.src/M000116.html +5 -4
  57. data/doc/classes/LongMath.src/M000117.html +4 -4
  58. data/doc/classes/LongMath.src/M000118.html +4 -5
  59. data/doc/classes/LongMath.src/M000119.html +5 -4
  60. data/doc/classes/LongMath.src/M000120.html +4 -18
  61. data/doc/classes/LongMath.src/M000121.html +14 -14
  62. data/doc/classes/LongMath.src/M000122.html +18 -5
  63. data/doc/classes/LongMath.src/M000123.html +5 -29
  64. data/doc/classes/LongMath.src/M000124.html +29 -5
  65. data/doc/classes/LongMath.src/M000125.html +5 -56
  66. data/doc/classes/LongMath.src/M000126.html +55 -19
  67. data/doc/classes/LongMath.src/M000127.html +20 -35
  68. data/doc/classes/LongMath.src/M000128.html +36 -6
  69. data/doc/classes/LongMath.src/M000129.html +6 -33
  70. data/doc/classes/LongMath.src/M000130.html +26 -41
  71. data/doc/classes/LongMath.src/M000131.html +46 -6
  72. data/doc/classes/LongMath.src/M000132.html +8 -4
  73. data/doc/classes/LongMath.src/M000133.html +4 -4
  74. data/doc/classes/LongMath.src/M000134.html +4 -64
  75. data/doc/classes/LongMath.src/M000135.html +59 -38
  76. data/doc/classes/LongMath.src/M000136.html +41 -8
  77. data/doc/classes/LongMath.src/M000137.html +4 -7
  78. data/doc/classes/LongMath.src/M000138.html +4 -20
  79. data/doc/classes/LongMath.src/M000139.html +4 -17
  80. data/doc/classes/LongMath.src/M000140.html +11 -34
  81. data/doc/classes/LongMath.src/M000141.html +14 -199
  82. data/doc/classes/LongMath.src/M000142.html +40 -16
  83. data/doc/classes/LongMath.src/M000143.html +211 -8
  84. data/doc/classes/LongMath.src/M000144.html +16 -41
  85. data/doc/classes/LongMath/CacheKey.html +5 -5
  86. data/doc/classes/Numeric.html +18 -0
  87. data/doc/classes/Numeric.src/M000102.html +1 -1
  88. data/doc/classes/Rational.html +5 -5
  89. data/doc/created.rid +1 -1
  90. data/doc/files/lib/long-decimal_rb.html +2 -2
  91. data/doc/files/lib/long-decimal_rb.src/M000001.html +1 -1
  92. data/doc/files/lib/long-decimal_rb.src/M000002.html +1 -1
  93. data/doc/fr_method_index.html +61 -59
  94. data/lib/long-decimal.rb +173 -80
  95. data/test/testlongdecimal.rb +258 -58
  96. metadata +2 -2
data/README CHANGED
@@ -1,26 +1,24 @@
1
1
  Version
2
2
  -------
3
3
 
4
- This version ($Name: PRE_ALPHA_0_20 $) is functionally identical with the
5
- previous pre-alpha-0.19. Improvements are for speed, because certain
6
- logarithms that are used frequently internally are cached now, so they
7
- need to be calculated only when needed for a higher precision than has
8
- been used before. The gem-file is now created using Ruby 1.8.4
9
- instead of 1.8.3. This fixes a bug in the metadata-file of the gem.
10
-
11
- It could be observed that gem-installation, as described below, fails
12
- on Windows 2000 with ruby 1.8.2, but works on Linux with ruby 1.8.4
13
- Any help from someone who knows more about Ruby on Windows would be
14
- apreciated. For the time being long-decimal has to be considered
15
- platform specific for Linux/Unix. We will see if the corrected
16
- metadata-file allows installation on Windows now.
17
-
18
- Beyond this restriction there are no known bugs and this version can
19
- be considered complete in terms of functionality. This version is
20
- still a pre-alpha-version, but it is expected to move it to alpha
21
- within the next weeks, after having added some more tests and having
22
- fixed potential bugs that these tests might reveal. I do not expect
23
- the first alpha version to be much different from this version.
4
+ This version ($Name: PRE_ALPHA_0_21 $) is functionally identical with the
5
+ previous pre-alpha-0.20. Improvements are for speed, because the
6
+ convergence acceleration for logarithm is done in a more efficient
7
+ way. This influences methods log2, log10 and power of LongMath.
8
+
9
+ There are no known bugs and this version can be considered complete in
10
+ terms of functionality. This version is still a pre-alpha-version,
11
+ but it is expected to move it to alpha within the next weeks, after
12
+ having added some more tests and having fixed potential bugs that
13
+ these tests might reveal. The first alpha version is not expected to
14
+ be much different from this version. This version should already be
15
+ usable. Operations +, -, *, / and sqrt should be working properly.
16
+ Even log, exp and power should be fine, but they might have some
17
+ issues in terms of precision of the last digits provided or in terms
18
+ of speed. It would be a good idea to do some mathematical analysis on
19
+ how many digits are needed internally to guarantee the correctness of
20
+ the digits that are provided. Testing as well as rough analysis
21
+ indicate that this might be correct already.
24
22
 
25
23
  This software development effort is hosted on RubyForge (
26
24
  http://rubyforge.org/ ) under the project name "long-decimal", to be
@@ -31,17 +29,20 @@ you install long-decimal.
31
29
  Test
32
30
  ----
33
31
 
34
- I have included some runit tests, which give some indication of the
35
- correctness of this library. Tests can never be exhaustive, but they
36
- give a good indication that methods are working correctly. About 90%
37
- of the tests that will be eventually needed are already present. As a
38
- policy I do not create a release unless all tests succeed.
39
- Running the tests can take a few minutes, depending on your machine.
40
- It is about 10 minutes on my machine (1300 MHz). This is the result:
41
-
42
- Finished in 567.162417 seconds.
43
- 97 tests, 44182 assertions, 0 failures, 0 errors
44
-
32
+ Some runit tests have been included. They give some indication of the
33
+ correctness of this library and allow changes to be checked in order
34
+ to make sure that what was running before would still work afterwards.
35
+ Tests for a library as complex as long-decimal can never be
36
+ exhaustive, but they give a good indication that methods are working
37
+ correctly. About 90% of the tests that will be eventually needed are
38
+ already present. As a policy a release is not created unless all
39
+ tests succeed. Running the tests can take a few minutes, depending on
40
+ your machine. It is about 15 minutes on my machine (1300 MHz).
41
+ Whatever is gained by making the software run faster is used up again
42
+ by adding more tests. This is the result of the test:
43
+
44
+ Finished in 869.98785 seconds.
45
+ 102 tests, 44345 assertions, 0 failures, 0 errors
45
46
 
46
47
  Install
47
48
  -------
data/Rakefile CHANGED
@@ -2,7 +2,7 @@
2
2
  # Rakefile for long-decimal project
3
3
  #
4
4
  # CVS-ID: $Header: /var/cvs/long-decimal/long-decimal/Rakefile,v 1.3 2006/04/01 08:52:06 bk1 Exp $
5
- # CVS-Label: $Name: PRE_ALPHA_0_20 $
5
+ # CVS-Label: $Name: PRE_ALPHA_0_21 $
6
6
  # Author: $Author: bk1 $ (Karl Brodowsky)
7
7
  #
8
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.00.20
1
+ 0.00.21
@@ -12,7 +12,7 @@
12
12
  <body class="standalone-code">
13
13
  <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1036</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sqrt</span>(<span class="ruby-identifier">new_scale</span>, <span class="ruby-identifier">rounding_mode</span>)
15
- <span class="ruby-identifier">sqrt_internal</span>(<span class="ruby-identifier">new_scale</span>, <span class="ruby-identifier">rounding_mode</span>, <span class="ruby-keyword kw">false</span>)
15
+ <span class="ruby-constant">LongMath</span>.<span class="ruby-identifier">sqrt</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">new_scale</span>, <span class="ruby-identifier">rounding_mode</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -12,7 +12,7 @@
12
12
  <body class="standalone-code">
13
13
  <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1046</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sqrt_with_remainder</span>(<span class="ruby-identifier">new_scale</span>)
15
- <span class="ruby-identifier">sqrt_internal</span>(<span class="ruby-identifier">new_scale</span>, <span class="ruby-constant">ROUND_DOWN</span>, <span class="ruby-keyword kw">true</span>)
15
+ <span class="ruby-constant">LongMath</span>.<span class="ruby-identifier">sqrt_with_remainder</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">new_scale</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1084</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1053</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">abs</span>
15
15
  <span class="ruby-constant">LongDecimal</span>(<span class="ruby-identifier">int_val</span>.<span class="ruby-identifier">abs</span>, <span class="ruby-identifier">scale</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1093</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1062</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">coerce</span>(<span class="ruby-identifier">other</span>)
15
15
 
16
16
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span> <span class="ruby-keyword kw">then</span>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1155</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1124</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_int?</span>
15
15
  <span class="ruby-identifier">scale</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">int_val</span> <span class="ruby-operator">%</span> <span class="ruby-value">10</span><span class="ruby-operator">**</span><span class="ruby-identifier">scale</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1165</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1134</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sgn</span>
15
15
  <span class="ruby-identifier">int_val</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-value">0</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1177</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1146</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
15
15
  <span class="ruby-comment cmt"># (other.kind_of? LongDecimal) &amp;&amp; (self &lt;=&gt; other) == 0 &amp;&amp; self.scale == other.scale</span>
16
16
  (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">int_val</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">int_val</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">scale</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">scale</span>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1187</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1156</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-operator">===</span>(<span class="ruby-identifier">other</span>)
15
15
  <span class="ruby-comment cmt"># (other.kind_of? LongDecimal) &amp;&amp; self.int_val == other.int_val</span>
16
16
  (<span class="ruby-keyword kw">self</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">other</span>).<span class="ruby-identifier">zero?</span>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1196</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1165</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">zero?</span>
15
15
  <span class="ruby-identifier">int_val</span>.<span class="ruby-identifier">zero?</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1204</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1173</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">one?</span>
15
15
  (<span class="ruby-keyword kw">self</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>).<span class="ruby-identifier">zero?</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1211</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1180</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash</span>
15
15
  <span class="ruby-identifier">int_val</span>.<span class="ruby-identifier">hash</span> <span class="ruby-operator">^</span> <span class="ruby-identifier">scale</span>.<span class="ruby-identifier">hash</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1218</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 1187</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
15
15
  <span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">&quot;LongDecimal(%s, %s)&quot;</span>, <span class="ruby-identifier">int_val</span>.<span class="ruby-identifier">inspect</span>, <span class="ruby-identifier">scale</span>.<span class="ruby-identifier">inspect</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -110,17 +110,17 @@ href="LongDecimalQuot.html">LongDecimalQuot</a>
110
110
  <h3 class="section-bar">Methods</h3>
111
111
 
112
112
  <div class="name-list">
113
- <a href="#M000107">+@</a>&nbsp;&nbsp;
114
- <a href="#M000112">&lt;=&gt;</a>&nbsp;&nbsp;
115
- <a href="#M000111">abs2</a>&nbsp;&nbsp;
116
- <a href="#M000106">dec</a>&nbsp;&nbsp;
117
- <a href="#M000105">inc</a>&nbsp;&nbsp;
118
- <a href="#M000110">inverse</a>&nbsp;&nbsp;
119
- <a href="#M000109">reciprocal</a>&nbsp;&nbsp;
120
- <a href="#M000114">scale_equal</a>&nbsp;&nbsp;
121
- <a href="#M000113">scale_ufo</a>&nbsp;&nbsp;
122
- <a href="#M000108">square</a>&nbsp;&nbsp;
123
- <a href="#M000104">to_r</a>&nbsp;&nbsp;
113
+ <a href="#M000108">+@</a>&nbsp;&nbsp;
114
+ <a href="#M000113">&lt;=&gt;</a>&nbsp;&nbsp;
115
+ <a href="#M000112">abs2</a>&nbsp;&nbsp;
116
+ <a href="#M000107">dec</a>&nbsp;&nbsp;
117
+ <a href="#M000106">inc</a>&nbsp;&nbsp;
118
+ <a href="#M000111">inverse</a>&nbsp;&nbsp;
119
+ <a href="#M000110">reciprocal</a>&nbsp;&nbsp;
120
+ <a href="#M000115">scale_equal</a>&nbsp;&nbsp;
121
+ <a href="#M000114">scale_ufo</a>&nbsp;&nbsp;
122
+ <a href="#M000109">square</a>&nbsp;&nbsp;
123
+ <a href="#M000105">to_r</a>&nbsp;&nbsp;
124
124
  </div>
125
125
  </div>
126
126
 
@@ -149,12 +149,12 @@ href="LongDecimalQuot.html">LongDecimalQuot</a>
149
149
  <div id="methods">
150
150
  <h3 class="section-bar">Public Instance methods</h3>
151
151
 
152
- <div id="method-M000107" class="method-detail">
153
- <a name="M000107"></a>
152
+ <div id="method-M000108" class="method-detail">
153
+ <a name="M000108"></a>
154
154
 
155
155
  <div class="method-heading">
156
- <a href="LongDecimalBase.src/M000107.html" target="Code" class="method-signature"
157
- onclick="popupCode('LongDecimalBase.src/M000107.html');return false;">
156
+ <a href="LongDecimalBase.src/M000108.html" target="Code" class="method-signature"
157
+ onclick="popupCode('LongDecimalBase.src/M000108.html');return false;">
158
158
  <span class="method-name">+@</span><span class="method-args">()</span>
159
159
  </a>
160
160
  </div>
@@ -166,12 +166,12 @@ unary plus returns self
166
166
  </div>
167
167
  </div>
168
168
 
169
- <div id="method-M000112" class="method-detail">
170
- <a name="M000112"></a>
169
+ <div id="method-M000113" class="method-detail">
170
+ <a name="M000113"></a>
171
171
 
172
172
  <div class="method-heading">
173
- <a href="LongDecimalBase.src/M000112.html" target="Code" class="method-signature"
174
- onclick="popupCode('LongDecimalBase.src/M000112.html');return false;">
173
+ <a href="LongDecimalBase.src/M000113.html" target="Code" class="method-signature"
174
+ onclick="popupCode('LongDecimalBase.src/M000113.html');return false;">
175
175
  <span class="method-name">&lt;=&gt;</span><span class="method-args">(other)</span>
176
176
  </a>
177
177
  </div>
@@ -193,8 +193,8 @@ of potentially zero digits after the decimal point.
193
193
  </div>
194
194
  </div>
195
195
 
196
- <div id="method-M000111" class="method-detail">
197
- <a name="M000111"></a>
196
+ <div id="method-M000112" class="method-detail">
197
+ <a name="M000112"></a>
198
198
 
199
199
  <div class="method-heading">
200
200
  <span class="method-name">abs2</span><span class="method-args">()</span>
@@ -202,17 +202,17 @@ of potentially zero digits after the decimal point.
202
202
 
203
203
  <div class="method-description">
204
204
  <p>
205
- Alias for <a href="LongDecimalBase.html#M000108">square</a>
205
+ Alias for <a href="LongDecimalBase.html#M000109">square</a>
206
206
  </p>
207
207
  </div>
208
208
  </div>
209
209
 
210
- <div id="method-M000106" class="method-detail">
211
- <a name="M000106"></a>
210
+ <div id="method-M000107" class="method-detail">
211
+ <a name="M000107"></a>
212
212
 
213
213
  <div class="method-heading">
214
- <a href="LongDecimalBase.src/M000106.html" target="Code" class="method-signature"
215
- onclick="popupCode('LongDecimalBase.src/M000106.html');return false;">
214
+ <a href="LongDecimalBase.src/M000107.html" target="Code" class="method-signature"
215
+ onclick="popupCode('LongDecimalBase.src/M000107.html');return false;">
216
216
  <span class="method-name">dec</span><span class="method-args">()</span>
217
217
  </a>
218
218
  </div>
@@ -224,12 +224,12 @@ self - 1
224
224
  </div>
225
225
  </div>
226
226
 
227
- <div id="method-M000105" class="method-detail">
228
- <a name="M000105"></a>
227
+ <div id="method-M000106" class="method-detail">
228
+ <a name="M000106"></a>
229
229
 
230
230
  <div class="method-heading">
231
- <a href="LongDecimalBase.src/M000105.html" target="Code" class="method-signature"
232
- onclick="popupCode('LongDecimalBase.src/M000105.html');return false;">
231
+ <a href="LongDecimalBase.src/M000106.html" target="Code" class="method-signature"
232
+ onclick="popupCode('LongDecimalBase.src/M000106.html');return false;">
233
233
  <span class="method-name">inc</span><span class="method-args">()</span>
234
234
  </a>
235
235
  </div>
@@ -241,8 +241,8 @@ self + 1
241
241
  </div>
242
242
  </div>
243
243
 
244
- <div id="method-M000110" class="method-detail">
245
- <a name="M000110"></a>
244
+ <div id="method-M000111" class="method-detail">
245
+ <a name="M000111"></a>
246
246
 
247
247
  <div class="method-heading">
248
248
  <span class="method-name">inverse</span><span class="method-args">()</span>
@@ -250,17 +250,17 @@ self + 1
250
250
 
251
251
  <div class="method-description">
252
252
  <p>
253
- Alias for <a href="LongDecimalBase.html#M000109">reciprocal</a>
253
+ Alias for <a href="LongDecimalBase.html#M000110">reciprocal</a>
254
254
  </p>
255
255
  </div>
256
256
  </div>
257
257
 
258
- <div id="method-M000109" class="method-detail">
259
- <a name="M000109"></a>
258
+ <div id="method-M000110" class="method-detail">
259
+ <a name="M000110"></a>
260
260
 
261
261
  <div class="method-heading">
262
- <a href="LongDecimalBase.src/M000109.html" target="Code" class="method-signature"
263
- onclick="popupCode('LongDecimalBase.src/M000109.html');return false;">
262
+ <a href="LongDecimalBase.src/M000110.html" target="Code" class="method-signature"
263
+ onclick="popupCode('LongDecimalBase.src/M000110.html');return false;">
264
264
  <span class="method-name">reciprocal</span><span class="method-args">()</span>
265
265
  </a>
266
266
  </div>
@@ -272,12 +272,12 @@ calculate the multiplicative inverse
272
272
  </div>
273
273
  </div>
274
274
 
275
- <div id="method-M000114" class="method-detail">
276
- <a name="M000114"></a>
275
+ <div id="method-M000115" class="method-detail">
276
+ <a name="M000115"></a>
277
277
 
278
278
  <div class="method-heading">
279
- <a href="LongDecimalBase.src/M000114.html" target="Code" class="method-signature"
280
- onclick="popupCode('LongDecimalBase.src/M000114.html');return false;">
279
+ <a href="LongDecimalBase.src/M000115.html" target="Code" class="method-signature"
280
+ onclick="popupCode('LongDecimalBase.src/M000115.html');return false;">
281
281
  <span class="method-name">scale_equal</span><span class="method-args">(other)</span>
282
282
  </a>
283
283
  </div>
@@ -287,12 +287,12 @@ calculate the multiplicative inverse
287
287
  </div>
288
288
  </div>
289
289
 
290
- <div id="method-M000113" class="method-detail">
291
- <a name="M000113"></a>
290
+ <div id="method-M000114" class="method-detail">
291
+ <a name="M000114"></a>
292
292
 
293
293
  <div class="method-heading">
294
- <a href="LongDecimalBase.src/M000113.html" target="Code" class="method-signature"
295
- onclick="popupCode('LongDecimalBase.src/M000113.html');return false;">
294
+ <a href="LongDecimalBase.src/M000114.html" target="Code" class="method-signature"
295
+ onclick="popupCode('LongDecimalBase.src/M000114.html');return false;">
296
296
  <span class="method-name">scale_ufo</span><span class="method-args">(other)</span>
297
297
  </a>
298
298
  </div>
@@ -304,12 +304,12 @@ calculate the multiplicative inverse
304
304
  </div>
305
305
  </div>
306
306
 
307
- <div id="method-M000108" class="method-detail">
308
- <a name="M000108"></a>
307
+ <div id="method-M000109" class="method-detail">
308
+ <a name="M000109"></a>
309
309
 
310
310
  <div class="method-heading">
311
- <a href="LongDecimalBase.src/M000108.html" target="Code" class="method-signature"
312
- onclick="popupCode('LongDecimalBase.src/M000108.html');return false;">
311
+ <a href="LongDecimalBase.src/M000109.html" target="Code" class="method-signature"
312
+ onclick="popupCode('LongDecimalBase.src/M000109.html');return false;">
313
313
  <span class="method-name">square</span><span class="method-args">()</span>
314
314
  </a>
315
315
  </div>
@@ -321,12 +321,12 @@ calculate the square of self
321
321
  </div>
322
322
  </div>
323
323
 
324
- <div id="method-M000104" class="method-detail">
325
- <a name="M000104"></a>
324
+ <div id="method-M000105" class="method-detail">
325
+ <a name="M000105"></a>
326
326
 
327
327
  <div class="method-heading">
328
- <a href="LongDecimalBase.src/M000104.html" target="Code" class="method-signature"
329
- onclick="popupCode('LongDecimalBase.src/M000104.html');return false;">
328
+ <a href="LongDecimalBase.src/M000105.html" target="Code" class="method-signature"
329
+ onclick="popupCode('LongDecimalBase.src/M000105.html');return false;">
330
330
  <span class="method-name">to_r</span><span class="method-args">()</span>
331
331
  </a>
332
332
  </div>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>inc (LongDecimalBase)</title>
8
+ <title>to_r (LongDecimalBase)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 82</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inc</span>
15
- <span class="ruby-keyword kw">self</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 75</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_r</span>
15
+ <span class="ruby-constant">Rational</span>(<span class="ruby-identifier">numerator</span>, <span class="ruby-identifier">denominator</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>dec (LongDecimalBase)</title>
8
+ <title>inc (LongDecimalBase)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 89</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dec</span>
15
- <span class="ruby-keyword kw">self</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 82</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inc</span>
15
+ <span class="ruby-keyword kw">self</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>