long-decimal 0.00.15 → 0.00.16
Sign up to get free protection for your applications and to get access to all the features.
- data/README +8 -5
- data/VERSION +1 -1
- data/doc/classes/{LongMath/LongDecimal.html → LongDecimal.html} +372 -515
- data/doc/classes/{LongMath/LongDecimal.src/M000060.html → LongDecimal.src/M000034.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000061.html → LongDecimal.src/M000035.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000062.html → LongDecimal.src/M000036.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000063.html → LongDecimal.src/M000037.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000064.html → LongDecimal.src/M000038.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000065.html → LongDecimal.src/M000039.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000066.html → LongDecimal.src/M000040.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000067.html → LongDecimal.src/M000041.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000068.html → LongDecimal.src/M000042.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000069.html → LongDecimal.src/M000043.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000070.html → LongDecimal.src/M000044.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000071.html → LongDecimal.src/M000045.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000072.html → LongDecimal.src/M000046.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000074.html → LongDecimal.src/M000047.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000075.html → LongDecimal.src/M000048.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000076.html → LongDecimal.src/M000049.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000077.html → LongDecimal.src/M000050.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000078.html → LongDecimal.src/M000051.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000079.html → LongDecimal.src/M000052.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000080.html → LongDecimal.src/M000053.html} +3 -4
- data/doc/classes/{LongMath/LongDecimal.src/M000081.html → LongDecimal.src/M000054.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000082.html → LongDecimal.src/M000055.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000083.html → LongDecimal.src/M000056.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000085.html → LongDecimal.src/M000058.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000088.html → LongDecimal.src/M000059.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000089.html → LongDecimal.src/M000060.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000090.html → LongDecimal.src/M000061.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000092.html → LongDecimal.src/M000062.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000093.html → LongDecimal.src/M000063.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000094.html → LongDecimal.src/M000064.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000095.html → LongDecimal.src/M000065.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000096.html → LongDecimal.src/M000066.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000097.html → LongDecimal.src/M000067.html} +4 -4
- data/doc/classes/{LongMath/LongDecimal.src/M000098.html → LongDecimal.src/M000068.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000099.html → LongDecimal.src/M000069.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000100.html → LongDecimal.src/M000070.html} +5 -5
- data/doc/classes/{LongMath/LongDecimal.src/M000101.html → LongDecimal.src/M000071.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000102.html → LongDecimal.src/M000072.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000103.html → LongDecimal.src/M000073.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000104.html → LongDecimal.src/M000074.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000105.html → LongDecimal.src/M000075.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000106.html → LongDecimal.src/M000076.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000107.html → LongDecimal.src/M000077.html} +6 -6
- data/doc/classes/{LongMath/LongDecimal.src/M000108.html → LongDecimal.src/M000078.html} +6 -6
- data/doc/classes/{LongMath/LongDecimal.src/M000109.html → LongDecimal.src/M000079.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000110.html → LongDecimal.src/M000080.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000111.html → LongDecimal.src/M000081.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000112.html → LongDecimal.src/M000082.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000113.html → LongDecimal.src/M000083.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000114.html → LongDecimal.src/M000084.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000115.html → LongDecimal.src/M000085.html} +3 -3
- data/doc/classes/LongDecimal.src/M000086.html +18 -0
- data/doc/classes/LongDecimal.src/M000087.html +18 -0
- data/doc/classes/{LongMath/LongDecimal.src/M000119.html → LongDecimal.src/M000088.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000124.html → LongDecimal.src/M000089.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000125.html → LongDecimal.src/M000090.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000126.html → LongDecimal.src/M000091.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000129.html → LongDecimal.src/M000094.html} +3 -3
- data/doc/classes/LongDecimal.src/M000095.html +18 -0
- data/doc/classes/{LongMath/LongDecimal.src/M000130.html → LongDecimal.src/M000096.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000131.html → LongDecimal.src/M000097.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000132.html → LongDecimal.src/M000098.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000133.html → LongDecimal.src/M000099.html} +3 -3
- data/doc/classes/LongDecimalBase.html +354 -0
- data/doc/classes/{LongMath/LongDecimal.src/M000073.html → LongDecimalBase.src/M000101.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000086.html → LongDecimalBase.src/M000102.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000087.html → LongDecimalBase.src/M000103.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000091.html → LongDecimalBase.src/M000104.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000044.html → LongDecimalBase.src/M000105.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000117.html → LongDecimalBase.src/M000106.html} +3 -3
- data/doc/classes/{LongMath/LongDecimal.src/M000121.html → LongDecimalBase.src/M000109.html} +4 -4
- data/doc/classes/{LongMath/LongDecimal.src/M000122.html → LongDecimalBase.src/M000110.html} +4 -4
- data/doc/classes/{LongMath/LongDecimal.src/M000123.html → LongDecimalBase.src/M000111.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.html → LongDecimalQuot.html} +249 -263
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000026.html → LongDecimalQuot.src/M000003.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000027.html → LongDecimalQuot.src/M000004.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000028.html → LongDecimalQuot.src/M000005.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000029.html → LongDecimalQuot.src/M000006.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000030.html → LongDecimalQuot.src/M000007.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000032.html → LongDecimalQuot.src/M000008.html} +3 -3
- data/doc/classes/LongDecimalQuot.src/M000009.html +18 -0
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000033.html → LongDecimalQuot.src/M000010.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000034.html → LongDecimalQuot.src/M000011.html} +3 -3
- data/doc/classes/LongDecimalQuot.src/M000012.html +18 -0
- data/doc/classes/LongDecimalQuot.src/M000013.html +18 -0
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000036.html → LongDecimalQuot.src/M000014.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000037.html → LongDecimalQuot.src/M000015.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000038.html → LongDecimalQuot.src/M000016.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000039.html → LongDecimalQuot.src/M000017.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000040.html → LongDecimalQuot.src/M000018.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000041.html → LongDecimalQuot.src/M000019.html} +4 -4
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000042.html → LongDecimalQuot.src/M000020.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000043.html → LongDecimalQuot.src/M000021.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000046.html → LongDecimalQuot.src/M000022.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000048.html → LongDecimalQuot.src/M000023.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000049.html → LongDecimalQuot.src/M000024.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000050.html → LongDecimalQuot.src/M000025.html} +3 -3
- data/doc/classes/LongDecimalQuot.src/M000026.html +18 -0
- data/doc/classes/LongDecimalQuot.src/M000027.html +18 -0
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000054.html → LongDecimalQuot.src/M000028.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000055.html → LongDecimalQuot.src/M000029.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000058.html → LongDecimalQuot.src/M000032.html} +3 -3
- data/doc/classes/{LongMath/LongDecimalQuot.src/M000059.html → LongDecimalQuot.src/M000033.html} +3 -3
- data/doc/classes/LongDecimalRoundingMode/RoundingModeClass.html +5 -5
- data/doc/classes/LongMath.html +117 -117
- data/doc/classes/LongMath.src/{M000001.html → M000112.html} +1 -1
- data/doc/classes/LongMath.src/{M000002.html → M000113.html} +1 -1
- data/doc/classes/LongMath.src/{M000003.html → M000114.html} +1 -1
- data/doc/classes/LongMath.src/{M000004.html → M000115.html} +1 -1
- data/doc/classes/LongMath.src/{M000005.html → M000116.html} +1 -1
- data/doc/classes/LongMath.src/{M000006.html → M000117.html} +1 -1
- data/doc/classes/LongMath.src/{M000007.html → M000118.html} +1 -1
- data/doc/classes/LongMath.src/{M000008.html → M000119.html} +1 -1
- data/doc/classes/LongMath.src/{M000009.html → M000120.html} +1 -1
- data/doc/classes/LongMath.src/{M000010.html → M000121.html} +1 -1
- data/doc/classes/LongMath.src/{M000011.html → M000122.html} +1 -4
- data/doc/classes/LongMath.src/{M000012.html → M000123.html} +1 -1
- data/doc/classes/LongMath.src/{M000013.html → M000124.html} +1 -1
- data/doc/classes/LongMath.src/{M000014.html → M000125.html} +1 -2
- data/doc/classes/LongMath.src/{M000015.html → M000126.html} +1 -1
- data/doc/classes/LongMath.src/{M000016.html → M000127.html} +1 -2
- data/doc/classes/LongMath.src/{M000017.html → M000128.html} +1 -5
- data/doc/classes/LongMath.src/{M000018.html → M000129.html} +1 -1
- data/doc/classes/LongMath.src/{M000019.html → M000130.html} +1 -1
- data/doc/classes/LongMath.src/{M000020.html → M000131.html} +1 -1
- data/doc/classes/LongMath.src/{M000021.html → M000132.html} +4 -3
- data/doc/classes/LongMath.src/{M000022.html → M000133.html} +1 -1
- data/doc/classes/LongMath.src/{M000023.html → M000134.html} +2 -1
- data/doc/classes/{LongMath/Numeric.html → Numeric.html} +18 -15
- data/doc/classes/{LongMath/Numeric.src/M000134.html → Numeric.src/M000100.html} +3 -3
- data/doc/created.rid +1 -1
- data/doc/dot/f_0.dot +14 -5
- data/doc/dot/f_0.png +0 -0
- data/doc/files/lib/long-decimal_rb.html +10 -9
- data/doc/{classes/LongMath.src/M000024.html → files/lib/long-decimal_rb.src/M000001.html} +3 -3
- data/doc/{classes/LongMath.src/M000025.html → files/lib/long-decimal_rb.src/M000002.html} +3 -3
- data/doc/fr_class_index.html +1 -0
- data/doc/fr_method_index.html +126 -127
- data/lib/long-decimal.rb +154 -160
- data/test/testlongdecimal.rb +140 -11
- metadata +138 -136
- data/doc/classes/LongMath/LongDecimal.src/M000116.html +0 -30
- data/doc/classes/LongMath/LongDecimalQuot.src/M000031.html +0 -18
- data/doc/classes/LongMath/LongDecimalQuot.src/M000035.html +0 -18
- data/doc/classes/LongMath/LongDecimalQuot.src/M000045.html +0 -18
- data/doc/classes/LongMath/LongDecimalQuot.src/M000047.html +0 -18
- data/doc/classes/LongMath/LongDecimalQuot.src/M000051.html +0 -23
- data/doc/classes/LongMath/LongDecimalQuot.src/M000052.html +0 -19
- data/doc/classes/LongMath/LongDecimalQuot.src/M000053.html +0 -18
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>unit (
|
8
|
+
<title>unit (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 685</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unit</span>
|
15
15
|
<span class="ruby-constant">LongDecimal</span>(<span class="ruby-value">1</span>, <span class="ruby-identifier">scale</span>)
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>-@ (
|
8
|
+
<title>-@ (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 693</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">-@</span>
|
15
15
|
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">zero?</span> <span class="ruby-keyword kw">then</span>
|
16
16
|
<span class="ruby-keyword kw">self</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>+ (
|
8
|
+
<title>+ (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 709</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-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">equalize_scale</span>(<span class="ruby-identifier">other</span>)
|
16
16
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span> <span class="ruby-keyword kw">then</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>- (
|
8
|
+
<title>- (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 726</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-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">equalize_scale</span>(<span class="ruby-identifier">other</span>)
|
16
16
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span> <span class="ruby-keyword kw">then</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>* (
|
8
|
+
<title>* (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 743</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-identifier">o</span>, <span class="ruby-identifier">s</span> = <span class="ruby-identifier">coerce</span>(<span class="ruby-identifier">other</span>)
|
16
16
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span> <span class="ruby-keyword kw">then</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>divide (
|
8
|
+
<title>divide (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 756</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">divide</span>(<span class="ruby-identifier">other</span>, <span class="ruby-identifier">rounding_mode</span>)
|
15
15
|
<span class="ruby-identifier">divide_s</span>(<span class="ruby-identifier">other</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">rounding_mode</span>)
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -5,18 +5,18 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>divide_s (
|
8
|
+
<title>divide_s (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 764</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">divide_s</span>(<span class="ruby-identifier">other</span>, <span class="ruby-identifier">new_scale</span>, <span class="ruby-identifier">rounding_mode</span>)
|
15
15
|
<span class="ruby-identifier">q</span> = <span class="ruby-keyword kw">self</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">other</span>
|
16
16
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">q</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Float</span>) <span class="ruby-keyword kw">then</span>
|
17
17
|
<span class="ruby-identifier">q</span> = <span class="ruby-constant">LongDecimal</span>(<span class="ruby-identifier">q</span>)
|
18
18
|
<span class="ruby-keyword kw">end</span>
|
19
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">q</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">
|
19
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">q</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimalBase</span>) <span class="ruby-keyword kw">then</span>
|
20
20
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">new_scale</span>.<span class="ruby-identifier">nil?</span>) <span class="ruby-keyword kw">then</span>
|
21
21
|
<span class="ruby-identifier">new_scale</span> = <span class="ruby-identifier">q</span>.<span class="ruby-identifier">scale</span>
|
22
22
|
<span class="ruby-keyword kw">end</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>rdiv (
|
8
|
+
<title>rdiv (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 783</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rdiv</span>(<span class="ruby-identifier">other</span>)
|
15
15
|
<span class="ruby-identifier">q</span> = <span class="ruby-keyword kw">self</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">other</span>
|
16
16
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">q</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimalQuot</span>) <span class="ruby-keyword kw">then</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>/ (
|
8
|
+
<title>/ (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 802</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-identifier">o</span>, <span class="ruby-identifier">s</span> = <span class="ruby-identifier">coerce</span>(<span class="ruby-identifier">other</span>)
|
16
16
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">s</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span>) <span class="ruby-keyword kw">then</span>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>** (
|
8
|
+
<title>** (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 822</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">**</span>(<span class="ruby-identifier">other</span>)
|
15
|
-
<span class="ruby-keyword kw">if</span> (
|
15
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimalBase</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">is_int?</span> <span class="ruby-keyword kw">then</span>
|
16
16
|
<span class="ruby-identifier">other</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_i</span>
|
17
17
|
<span class="ruby-keyword kw">end</span>
|
18
18
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Integer</span> <span class="ruby-keyword kw">then</span>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-constant">Rational</span>(<span class="ruby-value">10</span> <span class="ruby-operator">**</span> <span class="ruby-identifier">new_scale</span>, <span class="ruby-identifier">int_val</span> <span class="ruby-operator">**</span> <span class="ruby-identifier">abs_other</span>), <span class="ruby-identifier">new_scale</span>)
|
25
25
|
<span class="ruby-keyword kw">end</span>
|
26
26
|
<span class="ruby-keyword kw">else</span>
|
27
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">
|
27
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimalBase</span>) <span class="ruby-keyword kw">then</span>
|
28
28
|
<span class="ruby-identifier">other</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_r</span>
|
29
29
|
<span class="ruby-keyword kw">end</span>
|
30
30
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_r</span> <span class="ruby-operator">**</span> <span class="ruby-identifier">other</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>divmod (
|
8
|
+
<title>divmod (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 845</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">divmod</span>(<span class="ruby-identifier">other</span>)
|
15
15
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Complex</span>) <span class="ruby-keyword kw">then</span>
|
16
16
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"divmod not supported for Complex"</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>% (
|
8
|
+
<title>% (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 856</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-identifier">q</span>, <span class="ruby-identifier">r</span> = <span class="ruby-identifier">divmod</span> <span class="ruby-identifier">other</span>
|
16
16
|
<span class="ruby-identifier">r</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>& (
|
8
|
+
<title>& (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 864</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-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">equalize_scale</span>(<span class="ruby-identifier">other</span>)
|
16
16
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span> <span class="ruby-keyword kw">then</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>| (
|
8
|
+
<title>| (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 876</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-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">equalize_scale</span>(<span class="ruby-identifier">other</span>)
|
16
16
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span> <span class="ruby-keyword kw">then</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>^ (
|
8
|
+
<title>^ (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 888</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-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">equalize_scale</span>(<span class="ruby-identifier">other</span>)
|
16
16
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span> <span class="ruby-keyword kw">then</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>~ (
|
8
|
+
<title>~ (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 900</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">~</span>
|
15
15
|
<span class="ruby-constant">LongDecimal</span>(<span class="ruby-operator">~</span><span class="ruby-identifier">int_val</span>, <span class="ruby-identifier">scale</span>)
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -5,17 +5,17 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title><< (
|
8
|
+
<title><< (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 907</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><<</span>(<span class="ruby-identifier">other</span>)
|
15
|
-
<span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">
|
16
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"cannot shift by something other than
|
15
|
+
<span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">other</span> <span class="ruby-operator">>=</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">then</span>
|
16
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"cannot shift by something other than Fixnum >= 0"</span>
|
17
17
|
<span class="ruby-keyword kw">end</span>
|
18
|
-
<span class="ruby-constant">LongDecimal</span>(<span class="ruby-identifier">
|
18
|
+
<span class="ruby-constant">LongDecimal</span>(<span class="ruby-identifier">int_val</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">other</span>, <span class="ruby-identifier">scale</span>)
|
19
19
|
<span class="ruby-keyword kw">end</span></pre>
|
20
20
|
</body>
|
21
21
|
</html>
|
@@ -5,17 +5,17 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>>> (
|
8
|
+
<title>>> (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 917</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">>></span>(<span class="ruby-identifier">other</span>)
|
15
|
-
<span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">
|
16
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"cannot shift by something other than
|
15
|
+
<span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Fixnum</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">other</span> <span class="ruby-operator">>=</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">then</span>
|
16
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"cannot shift by something other than Fixnum >= 0"</span>
|
17
17
|
<span class="ruby-keyword kw">end</span>
|
18
|
-
<span class="ruby-constant">LongDecimal</span>(<span class="ruby-identifier">
|
18
|
+
<span class="ruby-constant">LongDecimal</span>(<span class="ruby-identifier">int_val</span> <span class="ruby-operator">>></span> <span class="ruby-identifier">other</span>, <span class="ruby-identifier">scale</span>)
|
19
19
|
<span class="ruby-keyword kw">end</span></pre>
|
20
20
|
</body>
|
21
21
|
</html>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>[] (
|
8
|
+
<title>[] (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 927</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-identifier">int_val</span>[<span class="ruby-identifier">other</span>]
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>size (
|
8
|
+
<title>size (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 934</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size</span>
|
15
15
|
<span class="ruby-identifier">int_val</span>.<span class="ruby-identifier">size</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>move_point_left (
|
8
|
+
<title>move_point_left (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 941</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">move_point_left</span>(<span class="ruby-identifier">n</span>)
|
15
15
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"only implemented for Fixnum"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Fixnum</span>
|
16
16
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">n</span> <span class="ruby-operator">>=</span> <span class="ruby-value">0</span>) <span class="ruby-keyword kw">then</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>move_point_right (
|
8
|
+
<title>move_point_right (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 953</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">move_point_right</span>(<span class="ruby-identifier">n</span>)
|
15
15
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"only implemented for Fixnum"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Fixnum</span>
|
16
16
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">n</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>) <span class="ruby-keyword kw">then</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>move_point_left_int (
|
8
|
+
<title>move_point_left_int (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 966</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">move_point_left_int</span>(<span class="ruby-identifier">n</span>)
|
15
15
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"only implemented for Fixnum >= 0"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">>=</span> <span class="ruby-value">0</span>
|
16
16
|
<span class="ruby-constant">LongDecimal</span>(<span class="ruby-identifier">int_val</span>, <span class="ruby-identifier">scale</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">n</span>)
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>move_point_right_int (
|
8
|
+
<title>move_point_right_int (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 975</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">move_point_right_int</span>(<span class="ruby-identifier">n</span>)
|
15
15
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"only implemented for Fixnum >= 0"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">>=</span> <span class="ruby-value">0</span>
|
16
16
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">n</span> <span class="ruby-operator">></span> <span class="ruby-identifier">scale</span>) <span class="ruby-keyword kw">then</span>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>square (
|
8
|
+
<title>square (LongDecimal)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="
|
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
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/long-decimal.rb, line 989</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">square</span>
|
15
15
|
<span class="ruby-keyword kw">self</span> <span class="ruby-operator">*</span> <span class="ruby-keyword kw">self</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|