long-decimal 0.00.11 → 0.00.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +6 -3
- data/VERSION +1 -1
- data/doc/classes/LongDecimalRoundingMode/RoundingModeClass.html +5 -5
- data/doc/classes/LongDecimalRoundingMode/RoundingModeClass.src/M000133.html +22 -0
- data/doc/classes/LongDecimalRoundingMode/RoundingModeClass.src/M000135.html +22 -0
- data/doc/classes/LongMath.html +78 -29
- data/doc/classes/LongMath.src/M000001.html +1 -1
- data/doc/classes/LongMath.src/M000002.html +1 -1
- data/doc/classes/LongMath.src/M000003.html +1 -1
- data/doc/classes/LongMath.src/M000004.html +1 -1
- data/doc/classes/LongMath.src/M000005.html +1 -1
- data/doc/classes/LongMath.src/M000006.html +1 -1
- data/doc/classes/LongMath.src/M000007.html +1 -1
- data/doc/classes/LongMath.src/M000008.html +1 -1
- data/doc/classes/LongMath.src/M000009.html +1 -1
- data/doc/classes/LongMath.src/M000010.html +1 -1
- data/doc/classes/LongMath.src/M000011.html +2 -2
- data/doc/classes/LongMath.src/M000012.html +1 -1
- data/doc/classes/LongMath.src/M000013.html +1 -1
- data/doc/classes/LongMath.src/M000014.html +1 -1
- data/doc/classes/LongMath.src/M000015.html +1 -1
- data/doc/classes/LongMath.src/M000016.html +14 -11
- data/doc/classes/LongMath.src/M000017.html +10 -17
- data/doc/classes/LongMath.src/M000018.html +1 -1
- data/doc/classes/LongMath.src/M000019.html +2 -1
- data/doc/classes/LongMath.src/M000021.html +51 -1
- data/doc/classes/LongMath.src/M000022.html +12 -9
- data/doc/classes/LongMath.src/M000023.html +28 -5
- data/doc/classes/LongMath.src/M000024.html +22 -0
- data/doc/classes/LongMath.src/M000025.html +18 -0
- data/doc/classes/LongMath/LongDecimal.html +371 -371
- data/doc/classes/LongMath/LongDecimal.src/M000058.html +18 -0
- data/doc/classes/LongMath/LongDecimal.src/M000059.html +18 -0
- data/doc/classes/LongMath/LongDecimal.src/M000060.html +18 -0
- data/doc/classes/LongMath/LongDecimal.src/M000061.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000062.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000063.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000064.html +4 -6
- data/doc/classes/LongMath/LongDecimal.src/M000065.html +4 -95
- data/doc/classes/LongMath/LongDecimal.src/M000066.html +6 -20
- data/doc/classes/LongMath/LongDecimal.src/M000067.html +92 -24
- data/doc/classes/LongMath/LongDecimal.src/M000068.html +17 -18
- data/doc/classes/LongMath/LongDecimal.src/M000069.html +27 -4
- data/doc/classes/LongMath/LongDecimal.src/M000070.html +19 -13
- data/doc/classes/LongMath/LongDecimal.src/M000071.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000072.html +13 -22
- data/doc/classes/LongMath/LongDecimal.src/M000073.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000074.html +24 -4
- data/doc/classes/LongMath/LongDecimal.src/M000075.html +4 -6
- data/doc/classes/LongMath/LongDecimal.src/M000076.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000077.html +6 -15
- data/doc/classes/LongMath/LongDecimal.src/M000078.html +4 -32
- data/doc/classes/LongMath/LongDecimal.src/M000079.html +14 -14
- data/doc/classes/LongMath/LongDecimal.src/M000080.html +31 -12
- data/doc/classes/LongMath/LongDecimal.src/M000081.html +15 -4
- data/doc/classes/LongMath/LongDecimal.src/M000082.html +27 -0
- data/doc/classes/LongMath/LongDecimal.src/M000083.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000085.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000086.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000087.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000088.html +18 -0
- data/doc/classes/LongMath/LongDecimal.src/M000089.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000090.html +4 -8
- data/doc/classes/LongMath/LongDecimal.src/M000091.html +4 -9
- data/doc/classes/LongMath/LongDecimal.src/M000092.html +6 -7
- data/doc/classes/LongMath/LongDecimal.src/M000093.html +6 -6
- data/doc/classes/LongMath/LongDecimal.src/M000094.html +9 -4
- data/doc/classes/LongMath/LongDecimal.src/M000095.html +7 -13
- data/doc/classes/LongMath/LongDecimal.src/M000096.html +4 -9
- data/doc/classes/LongMath/LongDecimal.src/M000097.html +13 -7
- data/doc/classes/LongMath/LongDecimal.src/M000098.html +7 -18
- data/doc/classes/LongMath/LongDecimal.src/M000099.html +8 -7
- data/doc/classes/LongMath/LongDecimal.src/M000100.html +20 -5
- data/doc/classes/LongMath/LongDecimal.src/M000101.html +7 -8
- data/doc/classes/LongMath/LongDecimal.src/M000102.html +5 -9
- data/doc/classes/LongMath/LongDecimal.src/M000103.html +5 -5
- data/doc/classes/LongMath/LongDecimal.src/M000104.html +9 -4
- data/doc/classes/LongMath/LongDecimal.src/M000105.html +8 -6
- data/doc/classes/LongMath/LongDecimal.src/M000106.html +4 -7
- data/doc/classes/LongMath/LongDecimal.src/M000107.html +7 -4
- data/doc/classes/LongMath/LongDecimal.src/M000108.html +7 -4
- data/doc/classes/LongMath/LongDecimal.src/M000109.html +4 -9
- data/doc/classes/LongMath/LongDecimal.src/M000110.html +4 -9
- data/doc/classes/LongMath/LongDecimal.src/M000111.html +9 -5
- data/doc/classes/LongMath/LongDecimal.src/M000112.html +7 -7
- data/doc/classes/LongMath/LongDecimal.src/M000113.html +5 -4
- data/doc/classes/LongMath/LongDecimal.src/M000114.html +8 -15
- data/doc/classes/LongMath/LongDecimal.src/M000115.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000116.html +15 -8
- data/doc/classes/LongMath/LongDecimal.src/M000117.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000119.html +4 -9
- data/doc/classes/LongMath/LongDecimal.src/M000121.html +9 -4
- data/doc/classes/LongMath/LongDecimal.src/M000122.html +5 -33
- data/doc/classes/LongMath/LongDecimal.src/M000123.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000124.html +33 -4
- data/doc/classes/LongMath/LongDecimal.src/M000125.html +4 -33
- data/doc/classes/LongMath/LongDecimal.src/M000126.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000128.html +18 -0
- data/doc/classes/LongMath/LongDecimal.src/M000129.html +19 -0
- data/doc/classes/LongMath/LongDecimal.src/M000130.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000131.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000132.html +4 -4
- data/doc/classes/LongMath/LongDecimal.src/M000133.html +4 -4
- data/doc/classes/LongMath/LongDecimalQuot.html +168 -168
- data/doc/classes/LongMath/LongDecimalQuot.src/M000026.html +4 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000027.html +14 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000028.html +4 -5
- data/doc/classes/LongMath/LongDecimalQuot.src/M000029.html +4 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000030.html +5 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000031.html +4 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000032.html +4 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000033.html +4 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000034.html +4 -8
- data/doc/classes/LongMath/LongDecimalQuot.src/M000035.html +4 -9
- data/doc/classes/LongMath/LongDecimalQuot.src/M000036.html +6 -7
- data/doc/classes/LongMath/LongDecimalQuot.src/M000037.html +5 -5
- data/doc/classes/LongMath/LongDecimalQuot.src/M000038.html +5 -5
- data/doc/classes/LongMath/LongDecimalQuot.src/M000039.html +7 -19
- data/doc/classes/LongMath/LongDecimalQuot.src/M000040.html +8 -7
- data/doc/classes/LongMath/LongDecimalQuot.src/M000041.html +21 -5
- data/doc/classes/LongMath/LongDecimalQuot.src/M000042.html +8 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000043.html +5 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000044.html +4 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000045.html +4 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000046.html +4 -63
- data/doc/classes/LongMath/LongDecimalQuot.src/M000047.html +4 -22
- data/doc/classes/LongMath/LongDecimalQuot.src/M000048.html +63 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000049.html +20 -7
- data/doc/classes/LongMath/LongDecimalQuot.src/M000050.html +4 -5
- data/doc/classes/LongMath/LongDecimalQuot.src/M000051.html +9 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000052.html +5 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000053.html +4 -4
- data/doc/classes/LongMath/LongDecimalQuot.src/M000054.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000055.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000056.html +18 -0
- data/doc/classes/LongMath/LongDecimalQuot.src/M000057.html +18 -0
- data/doc/classes/LongMath/LongDecimalQuot.src/M000058.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000059.html +4 -4
- data/doc/classes/LongMath/Numeric.html +5 -5
- data/doc/classes/LongMath/Numeric.src/M000132.html +18 -0
- data/doc/classes/LongMath/Numeric.src/M000134.html +18 -0
- data/doc/created.rid +1 -1
- data/doc/files/lib/longdecimal_rb.html +2 -2
- data/doc/fr_method_index.html +115 -113
- data/lib/longdecimal.rb +84 -34
- data/test/testlongdecimal.rb +271 -15
- metadata +17 -2
@@ -5,14 +5,19 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title
|
8
|
+
<title><=> (LongMath::LongDecimal)</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/longdecimal.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-
|
15
|
-
<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/longdecimal.rb, line 1677</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><=></span> (<span class="ruby-identifier">other</span>)
|
15
|
+
<span class="ruby-identifier">diff</span> = (<span class="ruby-keyword kw">self</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">other</span>)
|
16
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">diff</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span>) <span class="ruby-operator">||</span> (<span class="ruby-identifier">diff</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimalQuot</span>) <span class="ruby-keyword kw">then</span>
|
17
|
+
<span class="ruby-identifier">diff</span>.<span class="ruby-identifier">sgn</span>
|
18
|
+
<span class="ruby-keyword kw">else</span>
|
19
|
+
<span class="ruby-identifier">diff</span> <span class="ruby-operator"><=></span> <span class="ruby-value">0</span>
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
16
21
|
<span class="ruby-keyword kw">end</span></pre>
|
17
22
|
</body>
|
18
23
|
</html>
|
@@ -5,43 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>scale_ufo (LongMath::LongDecimal)</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/longdecimal.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-keyword kw">
|
16
|
-
|
17
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimalQuot</span> <span class="ruby-keyword kw">then</span>
|
18
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">other</span>, <span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_r</span>, <span class="ruby-identifier">scale</span>)
|
19
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Rational</span> <span class="ruby-keyword kw">then</span>
|
20
|
-
<span class="ruby-identifier">sc</span> = <span class="ruby-identifier">scale</span>
|
21
|
-
<span class="ruby-identifier">o</span> = <span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-identifier">other</span>, <span class="ruby-identifier">sc</span>)
|
22
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_r</span>, <span class="ruby-identifier">sc</span>)
|
23
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">o</span>, <span class="ruby-identifier">s</span>
|
24
|
-
<span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Integer</span>) <span class="ruby-operator">||</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Float</span>) <span class="ruby-keyword kw">then</span>
|
25
|
-
<span class="ruby-identifier">other</span> = <span class="ruby-constant">LongDecimal</span>(<span class="ruby-identifier">other</span>)
|
26
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">scale</span> <span class="ruby-operator">></span> <span class="ruby-identifier">scale</span>) <span class="ruby-keyword kw">then</span>
|
27
|
-
<span class="ruby-identifier">other</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">round_to_scale</span>(<span class="ruby-identifier">scale</span>, <span class="ruby-constant">ROUND_HALF_UP</span>)
|
28
|
-
<span class="ruby-keyword kw">end</span>
|
29
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">other</span>, <span class="ruby-keyword kw">self</span>
|
30
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">BigDecimal</span> <span class="ruby-keyword kw">then</span>
|
31
|
-
<span class="ruby-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">coerce</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_bd</span>)
|
32
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">o</span>, <span class="ruby-identifier">s</span>
|
33
|
-
<span class="ruby-keyword kw">elsif</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>
|
34
|
-
<span class="ruby-comment cmt"># s, o = other.coerce(Complex(self.to_bd, 0))</span>
|
35
|
-
<span class="ruby-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">coerce</span>(<span class="ruby-constant">Complex</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_f</span>, <span class="ruby-value">0</span>))
|
36
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">o</span>, <span class="ruby-identifier">s</span>
|
37
|
-
<span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Float</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">8</span> <span class="ruby-keyword kw">then</span>
|
38
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">coerce</span>(<span class="ruby-constant">BigDecimal</span>(<span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_s</span>))
|
39
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Numeric</span> <span class="ruby-keyword kw">then</span>
|
40
|
-
<span class="ruby-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">coerce</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_f</span>)
|
41
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">o</span>, <span class="ruby-identifier">s</span>
|
42
|
-
<span class="ruby-keyword kw">else</span>
|
43
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">"unsupported type #{other.inspect} for coerce of LongDecimal"</span>
|
44
|
-
<span class="ruby-keyword kw">end</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/longdecimal.rb, line 1689</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scale_ufo</span>(<span class="ruby-identifier">other</span>)
|
15
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"only works for LongDecimal and LongDecimalQuot"</span> <span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span>) <span class="ruby-operator">||</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimalQuot</span>)
|
16
|
+
<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>
|
45
17
|
<span class="ruby-keyword kw">end</span></pre>
|
46
18
|
</body>
|
47
19
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>scale_equal (LongMath::LongDecimal)</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/longdecimal.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/longdecimal.rb, line 1697</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scale_equal</span>(<span class="ruby-identifier">other</span>)
|
15
|
+
<span class="ruby-identifier">scale_ufo</span>(<span class="ruby-identifier">other</span>).<span class="ruby-identifier">zero?</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,14 +5,43 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>coerce (LongMath::LongDecimal)</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/longdecimal.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/longdecimal.rb, line 1706</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">coerce</span>(<span class="ruby-identifier">other</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">LongDecimal</span> <span class="ruby-keyword kw">then</span>
|
16
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">other</span>, <span class="ruby-keyword kw">self</span>
|
17
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimalQuot</span> <span class="ruby-keyword kw">then</span>
|
18
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">other</span>, <span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_r</span>, <span class="ruby-identifier">scale</span>)
|
19
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Rational</span> <span class="ruby-keyword kw">then</span>
|
20
|
+
<span class="ruby-identifier">sc</span> = <span class="ruby-identifier">scale</span>
|
21
|
+
<span class="ruby-identifier">o</span> = <span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-identifier">other</span>, <span class="ruby-identifier">sc</span>)
|
22
|
+
<span class="ruby-identifier">s</span> = <span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_r</span>, <span class="ruby-identifier">sc</span>)
|
23
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">o</span>, <span class="ruby-identifier">s</span>
|
24
|
+
<span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Integer</span>) <span class="ruby-operator">||</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Float</span>) <span class="ruby-keyword kw">then</span>
|
25
|
+
<span class="ruby-identifier">other</span> = <span class="ruby-constant">LongDecimal</span>(<span class="ruby-identifier">other</span>)
|
26
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">scale</span> <span class="ruby-operator">></span> <span class="ruby-identifier">scale</span>) <span class="ruby-keyword kw">then</span>
|
27
|
+
<span class="ruby-identifier">other</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">round_to_scale</span>(<span class="ruby-identifier">scale</span>, <span class="ruby-constant">ROUND_HALF_UP</span>)
|
28
|
+
<span class="ruby-keyword kw">end</span>
|
29
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">other</span>, <span class="ruby-keyword kw">self</span>
|
30
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">BigDecimal</span> <span class="ruby-keyword kw">then</span>
|
31
|
+
<span class="ruby-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">coerce</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_bd</span>)
|
32
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">o</span>, <span class="ruby-identifier">s</span>
|
33
|
+
<span class="ruby-keyword kw">elsif</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>
|
34
|
+
<span class="ruby-comment cmt"># s, o = other.coerce(Complex(self.to_bd, 0))</span>
|
35
|
+
<span class="ruby-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">coerce</span>(<span class="ruby-constant">Complex</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_f</span>, <span class="ruby-value">0</span>))
|
36
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">o</span>, <span class="ruby-identifier">s</span>
|
37
|
+
<span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Float</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">8</span> <span class="ruby-keyword kw">then</span>
|
38
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">coerce</span>(<span class="ruby-constant">BigDecimal</span>(<span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_s</span>))
|
39
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Numeric</span> <span class="ruby-keyword kw">then</span>
|
40
|
+
<span class="ruby-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">coerce</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_f</span>)
|
41
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">o</span>, <span class="ruby-identifier">s</span>
|
42
|
+
<span class="ruby-keyword kw">else</span>
|
43
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">"unsupported type #{other.inspect} for coerce of LongDecimal"</span>
|
44
|
+
<span class="ruby-keyword kw">end</span>
|
16
45
|
<span class="ruby-keyword kw">end</span></pre>
|
17
46
|
</body>
|
18
47
|
</html>
|
@@ -5,43 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>is_int? (LongMath::LongDecimal)</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/longdecimal.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
16
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">other</span>, <span class="ruby-keyword kw">self</span>
|
17
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimalQuot</span> <span class="ruby-keyword kw">then</span>
|
18
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">other</span>, <span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_r</span>, <span class="ruby-identifier">scale</span>)
|
19
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Rational</span> <span class="ruby-keyword kw">then</span>
|
20
|
-
<span class="ruby-identifier">sc</span> = <span class="ruby-identifier">scale</span>
|
21
|
-
<span class="ruby-identifier">o</span> = <span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-identifier">other</span>, <span class="ruby-identifier">sc</span>)
|
22
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_r</span>, <span class="ruby-identifier">sc</span>)
|
23
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">o</span>, <span class="ruby-identifier">s</span>
|
24
|
-
<span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Integer</span>) <span class="ruby-operator">||</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Float</span>) <span class="ruby-keyword kw">then</span>
|
25
|
-
<span class="ruby-identifier">other</span> = <span class="ruby-constant">LongDecimal</span>(<span class="ruby-identifier">other</span>)
|
26
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">scale</span> <span class="ruby-operator">></span> <span class="ruby-identifier">scale</span>) <span class="ruby-keyword kw">then</span>
|
27
|
-
<span class="ruby-identifier">other</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">round_to_scale</span>(<span class="ruby-identifier">scale</span>, <span class="ruby-constant">ROUND_HALF_UP</span>)
|
28
|
-
<span class="ruby-keyword kw">end</span>
|
29
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">other</span>, <span class="ruby-keyword kw">self</span>
|
30
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">BigDecimal</span> <span class="ruby-keyword kw">then</span>
|
31
|
-
<span class="ruby-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">coerce</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_bd</span>)
|
32
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">o</span>, <span class="ruby-identifier">s</span>
|
33
|
-
<span class="ruby-keyword kw">elsif</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>
|
34
|
-
<span class="ruby-comment cmt"># s, o = other.coerce(Complex(self.to_bd, 0))</span>
|
35
|
-
<span class="ruby-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">coerce</span>(<span class="ruby-constant">Complex</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_f</span>, <span class="ruby-value">0</span>))
|
36
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">o</span>, <span class="ruby-identifier">s</span>
|
37
|
-
<span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Float</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">8</span> <span class="ruby-keyword kw">then</span>
|
38
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">coerce</span>(<span class="ruby-constant">BigDecimal</span>(<span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_s</span>))
|
39
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Numeric</span> <span class="ruby-keyword kw">then</span>
|
40
|
-
<span class="ruby-identifier">s</span>, <span class="ruby-identifier">o</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">coerce</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_f</span>)
|
41
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">o</span>, <span class="ruby-identifier">s</span>
|
42
|
-
<span class="ruby-keyword kw">else</span>
|
43
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">"unsupported type #{other.inspect} for coerce of LongDecimal"</span>
|
44
|
-
<span class="ruby-keyword kw">end</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/longdecimal.rb, line 1742</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_int?</span>
|
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>
|
45
16
|
<span class="ruby-keyword kw">end</span></pre>
|
46
17
|
</body>
|
47
18
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>sgn (LongMath::LongDecimal)</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/longdecimal.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/longdecimal.rb, line 1752</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sgn</span>
|
15
|
+
<span class="ruby-identifier">int_val</span> <span class="ruby-operator"><=></span> <span class="ruby-value">0</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>zero? (LongMath::LongDecimal)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/longdecimal.rb, line 1723</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">zero?</span>
|
15
|
+
<span class="ruby-identifier">int_val</span>.<span class="ruby-identifier">zero?</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>== (LongMath::LongDecimal)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/longdecimal.rb, line 1764</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
|
15
|
+
<span class="ruby-comment cmt"># (other.kind_of? LongDecimal) && (self <=> other) == 0 && self.scale == other.scale</span>
|
16
|
+
(<span class="ruby-identifier">other</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span>) <span class="ruby-operator">&&</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">&&</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>
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>zero? (LongMath::LongDecimal)</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/longdecimal.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-identifier">int_val</span>.<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/longdecimal.rb, line 1773</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">zero?</span>
|
15
|
+
<span class="ruby-identifier">int_val</span>.<span class="ruby-identifier">zero?</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>
|
8
|
+
<title>one? (LongMath::LongDecimal)</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/longdecimal.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/longdecimal.rb, line 1781</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">one?</span>
|
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>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>hash (LongMath::LongDecimal)</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/longdecimal.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/longdecimal.rb, line 1788</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash</span>
|
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>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>inspect (LongMath::LongDecimal)</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/longdecimal.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/longdecimal.rb, line 1795</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
|
15
|
+
<span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">"LongDecimal(%s, %s)"</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>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -106,40 +106,40 @@ information on how to round the result.
|
|
106
106
|
<h3 class="section-bar">Methods</h3>
|
107
107
|
|
108
108
|
<div class="name-list">
|
109
|
-
<a href="#
|
110
|
-
<a href="#
|
111
|
-
<a href="#
|
112
|
-
<a href="#
|
113
|
-
<a href="#
|
114
|
-
<a href="#
|
115
|
-
<a href="#
|
116
|
-
<a href="#
|
117
|
-
<a href="#
|
118
|
-
<a href="#
|
119
|
-
<a href="#
|
120
|
-
<a href="#
|
121
|
-
<a href="#
|
122
|
-
<a href="#
|
123
|
-
<a href="#
|
124
|
-
<a href="#
|
125
|
-
<a href="#
|
126
|
-
<a href="#
|
127
|
-
<a href="#
|
128
|
-
<a href="#
|
129
|
-
<a href="#
|
130
|
-
<a href="#
|
131
|
-
<a href="#
|
132
|
-
<a href="#
|
133
|
-
<a href="#
|
134
|
-
<a href="#
|
135
|
-
<a href="#
|
136
|
-
<a href="#
|
137
|
-
<a href="#
|
138
|
-
<a href="#
|
139
|
-
<a href="#
|
140
|
-
<a href="#
|
141
|
-
<a href="#
|
142
|
-
<a href="#
|
109
|
+
<a href="#M000043">%</a>
|
110
|
+
<a href="#M000039">*</a>
|
111
|
+
<a href="#M000041">**</a>
|
112
|
+
<a href="#M000037">+</a>
|
113
|
+
<a href="#M000035">+@</a>
|
114
|
+
<a href="#M000038">-</a>
|
115
|
+
<a href="#M000036">-@</a>
|
116
|
+
<a href="#M000040">/</a>
|
117
|
+
<a href="#M000051"><=></a>
|
118
|
+
<a href="#M000050">==</a>
|
119
|
+
<a href="#M000046">abs</a>
|
120
|
+
<a href="#M000047">abs2</a>
|
121
|
+
<a href="#M000049">coerce</a>
|
122
|
+
<a href="#M000029">denominator</a>
|
123
|
+
<a href="#M000042">divmod</a>
|
124
|
+
<a href="#M000058">hash</a>
|
125
|
+
<a href="#M000059">inspect</a>
|
126
|
+
<a href="#M000054">is_int?</a>
|
127
|
+
<a href="#M000027">new</a>
|
128
|
+
<a href="#M000026">new!</a>
|
129
|
+
<a href="#M000028">numerator</a>
|
130
|
+
<a href="#M000045">reciprocal</a>
|
131
|
+
<a href="#M000048">round_to_scale</a>
|
132
|
+
<a href="#M000053">scale_equal</a>
|
133
|
+
<a href="#M000052">scale_ufo</a>
|
134
|
+
<a href="#M000055">sgn</a>
|
135
|
+
<a href="#M000057">sign</a>
|
136
|
+
<a href="#M000056">signum</a>
|
137
|
+
<a href="#M000044">square</a>
|
138
|
+
<a href="#M000032">to_f</a>
|
139
|
+
<a href="#M000033">to_i</a>
|
140
|
+
<a href="#M000034">to_ld</a>
|
141
|
+
<a href="#M000031">to_r</a>
|
142
|
+
<a href="#M000030">to_s</a>
|
143
143
|
</div>
|
144
144
|
</div>
|
145
145
|
|
@@ -186,12 +186,12 @@ information on how to round the result.
|
|
186
186
|
<div id="methods">
|
187
187
|
<h3 class="section-bar">Public Class methods</h3>
|
188
188
|
|
189
|
-
<div id="method-
|
190
|
-
<a name="
|
189
|
+
<div id="method-M000027" class="method-detail">
|
190
|
+
<a name="M000027"></a>
|
191
191
|
|
192
192
|
<div class="method-heading">
|
193
|
-
<a href="LongDecimalQuot.src/
|
194
|
-
onclick="popupCode('LongDecimalQuot.src/
|
193
|
+
<a href="LongDecimalQuot.src/M000027.html" target="Code" class="method-signature"
|
194
|
+
onclick="popupCode('LongDecimalQuot.src/M000027.html');return false;">
|
195
195
|
<span class="method-name">new</span><span class="method-args">(first, second)</span>
|
196
196
|
</a>
|
197
197
|
</div>
|
@@ -204,12 +204,12 @@ rational and a scale or a pair of LongDecimals
|
|
204
204
|
</div>
|
205
205
|
</div>
|
206
206
|
|
207
|
-
<div id="method-
|
208
|
-
<a name="
|
207
|
+
<div id="method-M000026" class="method-detail">
|
208
|
+
<a name="M000026"></a>
|
209
209
|
|
210
210
|
<div class="method-heading">
|
211
|
-
<a href="LongDecimalQuot.src/
|
212
|
-
onclick="popupCode('LongDecimalQuot.src/
|
211
|
+
<a href="LongDecimalQuot.src/M000026.html" target="Code" class="method-signature"
|
212
|
+
onclick="popupCode('LongDecimalQuot.src/M000026.html');return false;">
|
213
213
|
<span class="method-name">new!</span><span class="method-args">(first, second)</span>
|
214
214
|
</a>
|
215
215
|
</div>
|
@@ -229,12 +229,12 @@ value expressed by the <a href="LongDecimalQuot.html">LongDecimalQuot</a>
|
|
229
229
|
|
230
230
|
<h3 class="section-bar">Public Instance methods</h3>
|
231
231
|
|
232
|
-
<div id="method-
|
233
|
-
<a name="
|
232
|
+
<div id="method-M000043" class="method-detail">
|
233
|
+
<a name="M000043"></a>
|
234
234
|
|
235
235
|
<div class="method-heading">
|
236
|
-
<a href="LongDecimalQuot.src/
|
237
|
-
onclick="popupCode('LongDecimalQuot.src/
|
236
|
+
<a href="LongDecimalQuot.src/M000043.html" target="Code" class="method-signature"
|
237
|
+
onclick="popupCode('LongDecimalQuot.src/M000043.html');return false;">
|
238
238
|
<span class="method-name">%</span><span class="method-args">(other)</span>
|
239
239
|
</a>
|
240
240
|
</div>
|
@@ -243,12 +243,12 @@ value expressed by the <a href="LongDecimalQuot.html">LongDecimalQuot</a>
|
|
243
243
|
</div>
|
244
244
|
</div>
|
245
245
|
|
246
|
-
<div id="method-
|
247
|
-
<a name="
|
246
|
+
<div id="method-M000039" class="method-detail">
|
247
|
+
<a name="M000039"></a>
|
248
248
|
|
249
249
|
<div class="method-heading">
|
250
|
-
<a href="LongDecimalQuot.src/
|
251
|
-
onclick="popupCode('LongDecimalQuot.src/
|
250
|
+
<a href="LongDecimalQuot.src/M000039.html" target="Code" class="method-signature"
|
251
|
+
onclick="popupCode('LongDecimalQuot.src/M000039.html');return false;">
|
252
252
|
<span class="method-name">*</span><span class="method-args">(other)</span>
|
253
253
|
</a>
|
254
254
|
</div>
|
@@ -257,12 +257,12 @@ value expressed by the <a href="LongDecimalQuot.html">LongDecimalQuot</a>
|
|
257
257
|
</div>
|
258
258
|
</div>
|
259
259
|
|
260
|
-
<div id="method-
|
261
|
-
<a name="
|
260
|
+
<div id="method-M000041" class="method-detail">
|
261
|
+
<a name="M000041"></a>
|
262
262
|
|
263
263
|
<div class="method-heading">
|
264
|
-
<a href="LongDecimalQuot.src/
|
265
|
-
onclick="popupCode('LongDecimalQuot.src/
|
264
|
+
<a href="LongDecimalQuot.src/M000041.html" target="Code" class="method-signature"
|
265
|
+
onclick="popupCode('LongDecimalQuot.src/M000041.html');return false;">
|
266
266
|
<span class="method-name">**</span><span class="method-args">(other)</span>
|
267
267
|
</a>
|
268
268
|
</div>
|
@@ -271,12 +271,12 @@ value expressed by the <a href="LongDecimalQuot.html">LongDecimalQuot</a>
|
|
271
271
|
</div>
|
272
272
|
</div>
|
273
273
|
|
274
|
-
<div id="method-
|
275
|
-
<a name="
|
274
|
+
<div id="method-M000037" class="method-detail">
|
275
|
+
<a name="M000037"></a>
|
276
276
|
|
277
277
|
<div class="method-heading">
|
278
|
-
<a href="LongDecimalQuot.src/
|
279
|
-
onclick="popupCode('LongDecimalQuot.src/
|
278
|
+
<a href="LongDecimalQuot.src/M000037.html" target="Code" class="method-signature"
|
279
|
+
onclick="popupCode('LongDecimalQuot.src/M000037.html');return false;">
|
280
280
|
<span class="method-name">+</span><span class="method-args">(other)</span>
|
281
281
|
</a>
|
282
282
|
</div>
|
@@ -291,12 +291,12 @@ Rationals otherwise use BigDecimal, Complex or Float
|
|
291
291
|
</div>
|
292
292
|
</div>
|
293
293
|
|
294
|
-
<div id="method-
|
295
|
-
<a name="
|
294
|
+
<div id="method-M000035" class="method-detail">
|
295
|
+
<a name="M000035"></a>
|
296
296
|
|
297
297
|
<div class="method-heading">
|
298
|
-
<a href="LongDecimalQuot.src/
|
299
|
-
onclick="popupCode('LongDecimalQuot.src/
|
298
|
+
<a href="LongDecimalQuot.src/M000035.html" target="Code" class="method-signature"
|
299
|
+
onclick="popupCode('LongDecimalQuot.src/M000035.html');return false;">
|
300
300
|
<span class="method-name">+@</span><span class="method-args">()</span>
|
301
301
|
</a>
|
302
302
|
</div>
|
@@ -308,12 +308,12 @@ unary plus returns self
|
|
308
308
|
</div>
|
309
309
|
</div>
|
310
310
|
|
311
|
-
<div id="method-
|
312
|
-
<a name="
|
311
|
+
<div id="method-M000038" class="method-detail">
|
312
|
+
<a name="M000038"></a>
|
313
313
|
|
314
314
|
<div class="method-heading">
|
315
|
-
<a href="LongDecimalQuot.src/
|
316
|
-
onclick="popupCode('LongDecimalQuot.src/
|
315
|
+
<a href="LongDecimalQuot.src/M000038.html" target="Code" class="method-signature"
|
316
|
+
onclick="popupCode('LongDecimalQuot.src/M000038.html');return false;">
|
317
317
|
<span class="method-name">-</span><span class="method-args">(other)</span>
|
318
318
|
</a>
|
319
319
|
</div>
|
@@ -322,12 +322,12 @@ unary plus returns self
|
|
322
322
|
</div>
|
323
323
|
</div>
|
324
324
|
|
325
|
-
<div id="method-
|
326
|
-
<a name="
|
325
|
+
<div id="method-M000036" class="method-detail">
|
326
|
+
<a name="M000036"></a>
|
327
327
|
|
328
328
|
<div class="method-heading">
|
329
|
-
<a href="LongDecimalQuot.src/
|
330
|
-
onclick="popupCode('LongDecimalQuot.src/
|
329
|
+
<a href="LongDecimalQuot.src/M000036.html" target="Code" class="method-signature"
|
330
|
+
onclick="popupCode('LongDecimalQuot.src/M000036.html');return false;">
|
331
331
|
<span class="method-name">-@</span><span class="method-args">()</span>
|
332
332
|
</a>
|
333
333
|
</div>
|
@@ -339,12 +339,12 @@ unary minus returns negation of self leaves self unchanged.
|
|
339
339
|
</div>
|
340
340
|
</div>
|
341
341
|
|
342
|
-
<div id="method-
|
343
|
-
<a name="
|
342
|
+
<div id="method-M000040" class="method-detail">
|
343
|
+
<a name="M000040"></a>
|
344
344
|
|
345
345
|
<div class="method-heading">
|
346
|
-
<a href="LongDecimalQuot.src/
|
347
|
-
onclick="popupCode('LongDecimalQuot.src/
|
346
|
+
<a href="LongDecimalQuot.src/M000040.html" target="Code" class="method-signature"
|
347
|
+
onclick="popupCode('LongDecimalQuot.src/M000040.html');return false;">
|
348
348
|
<span class="method-name">/</span><span class="method-args">(other)</span>
|
349
349
|
</a>
|
350
350
|
</div>
|
@@ -353,12 +353,12 @@ unary minus returns negation of self leaves self unchanged.
|
|
353
353
|
</div>
|
354
354
|
</div>
|
355
355
|
|
356
|
-
<div id="method-
|
357
|
-
<a name="
|
356
|
+
<div id="method-M000051" class="method-detail">
|
357
|
+
<a name="M000051"></a>
|
358
358
|
|
359
359
|
<div class="method-heading">
|
360
|
-
<a href="LongDecimalQuot.src/
|
361
|
-
onclick="popupCode('LongDecimalQuot.src/
|
360
|
+
<a href="LongDecimalQuot.src/M000051.html" target="Code" class="method-signature"
|
361
|
+
onclick="popupCode('LongDecimalQuot.src/M000051.html');return false;">
|
362
362
|
<span class="method-name"><=></span><span class="method-args">(other)</span>
|
363
363
|
</a>
|
364
364
|
</div>
|
@@ -370,12 +370,12 @@ Compares the two numbers for < and > etc.
|
|
370
370
|
</div>
|
371
371
|
</div>
|
372
372
|
|
373
|
-
<div id="method-
|
374
|
-
<a name="
|
373
|
+
<div id="method-M000050" class="method-detail">
|
374
|
+
<a name="M000050"></a>
|
375
375
|
|
376
376
|
<div class="method-heading">
|
377
|
-
<a href="LongDecimalQuot.src/
|
378
|
-
onclick="popupCode('LongDecimalQuot.src/
|
377
|
+
<a href="LongDecimalQuot.src/M000050.html" target="Code" class="method-signature"
|
378
|
+
onclick="popupCode('LongDecimalQuot.src/M000050.html');return false;">
|
379
379
|
<span class="method-name">==</span><span class="method-args">(other)</span>
|
380
380
|
</a>
|
381
381
|
</div>
|
@@ -394,12 +394,12 @@ point is given. But scale needs to match for equality.
|
|
394
394
|
</div>
|
395
395
|
</div>
|
396
396
|
|
397
|
-
<div id="method-
|
398
|
-
<a name="
|
397
|
+
<div id="method-M000046" class="method-detail">
|
398
|
+
<a name="M000046"></a>
|
399
399
|
|
400
400
|
<div class="method-heading">
|
401
|
-
<a href="LongDecimalQuot.src/
|
402
|
-
onclick="popupCode('LongDecimalQuot.src/
|
401
|
+
<a href="LongDecimalQuot.src/M000046.html" target="Code" class="method-signature"
|
402
|
+
onclick="popupCode('LongDecimalQuot.src/M000046.html');return false;">
|
403
403
|
<span class="method-name">abs</span><span class="method-args">()</span>
|
404
404
|
</a>
|
405
405
|
</div>
|
@@ -411,12 +411,12 @@ Absolute value
|
|
411
411
|
</div>
|
412
412
|
</div>
|
413
413
|
|
414
|
-
<div id="method-
|
415
|
-
<a name="
|
414
|
+
<div id="method-M000047" class="method-detail">
|
415
|
+
<a name="M000047"></a>
|
416
416
|
|
417
417
|
<div class="method-heading">
|
418
|
-
<a href="LongDecimalQuot.src/
|
419
|
-
onclick="popupCode('LongDecimalQuot.src/
|
418
|
+
<a href="LongDecimalQuot.src/M000047.html" target="Code" class="method-signature"
|
419
|
+
onclick="popupCode('LongDecimalQuot.src/M000047.html');return false;">
|
420
420
|
<span class="method-name">abs2</span><span class="method-args">()</span>
|
421
421
|
</a>
|
422
422
|
</div>
|
@@ -425,12 +425,12 @@ Absolute value
|
|
425
425
|
</div>
|
426
426
|
</div>
|
427
427
|
|
428
|
-
<div id="method-
|
429
|
-
<a name="
|
428
|
+
<div id="method-M000049" class="method-detail">
|
429
|
+
<a name="M000049"></a>
|
430
430
|
|
431
431
|
<div class="method-heading">
|
432
|
-
<a href="LongDecimalQuot.src/
|
433
|
-
onclick="popupCode('LongDecimalQuot.src/
|
432
|
+
<a href="LongDecimalQuot.src/M000049.html" target="Code" class="method-signature"
|
433
|
+
onclick="popupCode('LongDecimalQuot.src/M000049.html');return false;">
|
434
434
|
<span class="method-name">coerce</span><span class="method-args">(other)</span>
|
435
435
|
</a>
|
436
436
|
</div>
|
@@ -450,12 +450,12 @@ BigDecimal or Float.
|
|
450
450
|
</div>
|
451
451
|
</div>
|
452
452
|
|
453
|
-
<div id="method-
|
454
|
-
<a name="
|
453
|
+
<div id="method-M000029" class="method-detail">
|
454
|
+
<a name="M000029"></a>
|
455
455
|
|
456
456
|
<div class="method-heading">
|
457
|
-
<a href="LongDecimalQuot.src/
|
458
|
-
onclick="popupCode('LongDecimalQuot.src/
|
457
|
+
<a href="LongDecimalQuot.src/M000029.html" target="Code" class="method-signature"
|
458
|
+
onclick="popupCode('LongDecimalQuot.src/M000029.html');return false;">
|
459
459
|
<span class="method-name">denominator</span><span class="method-args">()</span>
|
460
460
|
</a>
|
461
461
|
</div>
|
@@ -468,12 +468,12 @@ like Rationals
|
|
468
468
|
</div>
|
469
469
|
</div>
|
470
470
|
|
471
|
-
<div id="method-
|
472
|
-
<a name="
|
471
|
+
<div id="method-M000042" class="method-detail">
|
472
|
+
<a name="M000042"></a>
|
473
473
|
|
474
474
|
<div class="method-heading">
|
475
|
-
<a href="LongDecimalQuot.src/
|
476
|
-
onclick="popupCode('LongDecimalQuot.src/
|
475
|
+
<a href="LongDecimalQuot.src/M000042.html" target="Code" class="method-signature"
|
476
|
+
onclick="popupCode('LongDecimalQuot.src/M000042.html');return false;">
|
477
477
|
<span class="method-name">divmod</span><span class="method-args">(other)</span>
|
478
478
|
</a>
|
479
479
|
</div>
|
@@ -482,12 +482,12 @@ like Rationals
|
|
482
482
|
</div>
|
483
483
|
</div>
|
484
484
|
|
485
|
-
<div id="method-
|
486
|
-
<a name="
|
485
|
+
<div id="method-M000058" class="method-detail">
|
486
|
+
<a name="M000058"></a>
|
487
487
|
|
488
488
|
<div class="method-heading">
|
489
|
-
<a href="LongDecimalQuot.src/
|
490
|
-
onclick="popupCode('LongDecimalQuot.src/
|
489
|
+
<a href="LongDecimalQuot.src/M000058.html" target="Code" class="method-signature"
|
490
|
+
onclick="popupCode('LongDecimalQuot.src/M000058.html');return false;">
|
491
491
|
<span class="method-name">hash</span><span class="method-args">()</span>
|
492
492
|
</a>
|
493
493
|
</div>
|
@@ -499,12 +499,12 @@ Returns a hash code for the complex number.
|
|
499
499
|
</div>
|
500
500
|
</div>
|
501
501
|
|
502
|
-
<div id="method-
|
503
|
-
<a name="
|
502
|
+
<div id="method-M000059" class="method-detail">
|
503
|
+
<a name="M000059"></a>
|
504
504
|
|
505
505
|
<div class="method-heading">
|
506
|
-
<a href="LongDecimalQuot.src/
|
507
|
-
onclick="popupCode('LongDecimalQuot.src/
|
506
|
+
<a href="LongDecimalQuot.src/M000059.html" target="Code" class="method-signature"
|
507
|
+
onclick="popupCode('LongDecimalQuot.src/M000059.html');return false;">
|
508
508
|
<span class="method-name">inspect</span><span class="method-args">()</span>
|
509
509
|
</a>
|
510
510
|
</div>
|
@@ -518,12 +518,12 @@ href="LongDecimalQuot.html">LongDecimalQuot</a>(<em>int_val</em>,
|
|
518
518
|
</div>
|
519
519
|
</div>
|
520
520
|
|
521
|
-
<div id="method-
|
522
|
-
<a name="
|
521
|
+
<div id="method-M000054" class="method-detail">
|
522
|
+
<a name="M000054"></a>
|
523
523
|
|
524
524
|
<div class="method-heading">
|
525
|
-
<a href="LongDecimalQuot.src/
|
526
|
-
onclick="popupCode('LongDecimalQuot.src/
|
525
|
+
<a href="LongDecimalQuot.src/M000054.html" target="Code" class="method-signature"
|
526
|
+
onclick="popupCode('LongDecimalQuot.src/M000054.html');return false;">
|
527
527
|
<span class="method-name">is_int?</span><span class="method-args">()</span>
|
528
528
|
</a>
|
529
529
|
</div>
|
@@ -535,12 +535,12 @@ is self expressable as an integer without loss of digits?
|
|
535
535
|
</div>
|
536
536
|
</div>
|
537
537
|
|
538
|
-
<div id="method-
|
539
|
-
<a name="
|
538
|
+
<div id="method-M000028" class="method-detail">
|
539
|
+
<a name="M000028"></a>
|
540
540
|
|
541
541
|
<div class="method-heading">
|
542
|
-
<a href="LongDecimalQuot.src/
|
543
|
-
onclick="popupCode('LongDecimalQuot.src/
|
542
|
+
<a href="LongDecimalQuot.src/M000028.html" target="Code" class="method-signature"
|
543
|
+
onclick="popupCode('LongDecimalQuot.src/M000028.html');return false;">
|
544
544
|
<span class="method-name">numerator</span><span class="method-args">()</span>
|
545
545
|
</a>
|
546
546
|
</div>
|
@@ -553,12 +553,12 @@ like Rationals
|
|
553
553
|
</div>
|
554
554
|
</div>
|
555
555
|
|
556
|
-
<div id="method-
|
557
|
-
<a name="
|
556
|
+
<div id="method-M000045" class="method-detail">
|
557
|
+
<a name="M000045"></a>
|
558
558
|
|
559
559
|
<div class="method-heading">
|
560
|
-
<a href="LongDecimalQuot.src/
|
561
|
-
onclick="popupCode('LongDecimalQuot.src/
|
560
|
+
<a href="LongDecimalQuot.src/M000045.html" target="Code" class="method-signature"
|
561
|
+
onclick="popupCode('LongDecimalQuot.src/M000045.html');return false;">
|
562
562
|
<span class="method-name">reciprocal</span><span class="method-args">()</span>
|
563
563
|
</a>
|
564
564
|
</div>
|
@@ -570,12 +570,12 @@ calculate the multiplicative inverse
|
|
570
570
|
</div>
|
571
571
|
</div>
|
572
572
|
|
573
|
-
<div id="method-
|
574
|
-
<a name="
|
573
|
+
<div id="method-M000048" class="method-detail">
|
574
|
+
<a name="M000048"></a>
|
575
575
|
|
576
576
|
<div class="method-heading">
|
577
|
-
<a href="LongDecimalQuot.src/
|
578
|
-
onclick="popupCode('LongDecimalQuot.src/
|
577
|
+
<a href="LongDecimalQuot.src/M000048.html" target="Code" class="method-signature"
|
578
|
+
onclick="popupCode('LongDecimalQuot.src/M000048.html');return false;">
|
579
579
|
<span class="method-name">round_to_scale</span><span class="method-args">(new_scale = @scale, mode = ROUND_UNNECESSARY)</span>
|
580
580
|
</a>
|
581
581
|
</div>
|
@@ -589,12 +589,12 @@ given rounding mode
|
|
589
589
|
</div>
|
590
590
|
</div>
|
591
591
|
|
592
|
-
<div id="method-
|
593
|
-
<a name="
|
592
|
+
<div id="method-M000053" class="method-detail">
|
593
|
+
<a name="M000053"></a>
|
594
594
|
|
595
595
|
<div class="method-heading">
|
596
|
-
<a href="LongDecimalQuot.src/
|
597
|
-
onclick="popupCode('LongDecimalQuot.src/
|
596
|
+
<a href="LongDecimalQuot.src/M000053.html" target="Code" class="method-signature"
|
597
|
+
onclick="popupCode('LongDecimalQuot.src/M000053.html');return false;">
|
598
598
|
<span class="method-name">scale_equal</span><span class="method-args">(other)</span>
|
599
599
|
</a>
|
600
600
|
</div>
|
@@ -606,12 +606,12 @@ check if scales are equal
|
|
606
606
|
</div>
|
607
607
|
</div>
|
608
608
|
|
609
|
-
<div id="method-
|
610
|
-
<a name="
|
609
|
+
<div id="method-M000052" class="method-detail">
|
610
|
+
<a name="M000052"></a>
|
611
611
|
|
612
612
|
<div class="method-heading">
|
613
|
-
<a href="LongDecimalQuot.src/
|
614
|
-
onclick="popupCode('LongDecimalQuot.src/
|
613
|
+
<a href="LongDecimalQuot.src/M000052.html" target="Code" class="method-signature"
|
614
|
+
onclick="popupCode('LongDecimalQuot.src/M000052.html');return false;">
|
615
615
|
<span class="method-name">scale_ufo</span><span class="method-args">(other)</span>
|
616
616
|
</a>
|
617
617
|
</div>
|
@@ -623,12 +623,12 @@ compare scales with <=>
|
|
623
623
|
</div>
|
624
624
|
</div>
|
625
625
|
|
626
|
-
<div id="method-
|
627
|
-
<a name="
|
626
|
+
<div id="method-M000055" class="method-detail">
|
627
|
+
<a name="M000055"></a>
|
628
628
|
|
629
629
|
<div class="method-heading">
|
630
|
-
<a href="LongDecimalQuot.src/
|
631
|
-
onclick="popupCode('LongDecimalQuot.src/
|
630
|
+
<a href="LongDecimalQuot.src/M000055.html" target="Code" class="method-signature"
|
631
|
+
onclick="popupCode('LongDecimalQuot.src/M000055.html');return false;">
|
632
632
|
<span class="method-name">sgn</span><span class="method-args">()</span>
|
633
633
|
</a>
|
634
634
|
</div>
|
@@ -640,8 +640,8 @@ sign of self
|
|
640
640
|
</div>
|
641
641
|
</div>
|
642
642
|
|
643
|
-
<div id="method-
|
644
|
-
<a name="
|
643
|
+
<div id="method-M000057" class="method-detail">
|
644
|
+
<a name="M000057"></a>
|
645
645
|
|
646
646
|
<div class="method-heading">
|
647
647
|
<span class="method-name">sign</span><span class="method-args">()</span>
|
@@ -649,13 +649,13 @@ sign of self
|
|
649
649
|
|
650
650
|
<div class="method-description">
|
651
651
|
<p>
|
652
|
-
Alias for <a href="LongDecimalQuot.html#
|
652
|
+
Alias for <a href="LongDecimalQuot.html#M000055">sgn</a>
|
653
653
|
</p>
|
654
654
|
</div>
|
655
655
|
</div>
|
656
656
|
|
657
|
-
<div id="method-
|
658
|
-
<a name="
|
657
|
+
<div id="method-M000056" class="method-detail">
|
658
|
+
<a name="M000056"></a>
|
659
659
|
|
660
660
|
<div class="method-heading">
|
661
661
|
<span class="method-name">signum</span><span class="method-args">()</span>
|
@@ -663,17 +663,17 @@ Alias for <a href="LongDecimalQuot.html#M000053">sgn</a>
|
|
663
663
|
|
664
664
|
<div class="method-description">
|
665
665
|
<p>
|
666
|
-
Alias for <a href="LongDecimalQuot.html#
|
666
|
+
Alias for <a href="LongDecimalQuot.html#M000055">sgn</a>
|
667
667
|
</p>
|
668
668
|
</div>
|
669
669
|
</div>
|
670
670
|
|
671
|
-
<div id="method-
|
672
|
-
<a name="
|
671
|
+
<div id="method-M000044" class="method-detail">
|
672
|
+
<a name="M000044"></a>
|
673
673
|
|
674
674
|
<div class="method-heading">
|
675
|
-
<a href="LongDecimalQuot.src/
|
676
|
-
onclick="popupCode('LongDecimalQuot.src/
|
675
|
+
<a href="LongDecimalQuot.src/M000044.html" target="Code" class="method-signature"
|
676
|
+
onclick="popupCode('LongDecimalQuot.src/M000044.html');return false;">
|
677
677
|
<span class="method-name">square</span><span class="method-args">()</span>
|
678
678
|
</a>
|
679
679
|
</div>
|
@@ -696,12 +696,12 @@ end
|
|
696
696
|
</div>
|
697
697
|
</div>
|
698
698
|
|
699
|
-
<div id="method-
|
700
|
-
<a name="
|
699
|
+
<div id="method-M000032" class="method-detail">
|
700
|
+
<a name="M000032"></a>
|
701
701
|
|
702
702
|
<div class="method-heading">
|
703
|
-
<a href="LongDecimalQuot.src/
|
704
|
-
onclick="popupCode('LongDecimalQuot.src/
|
703
|
+
<a href="LongDecimalQuot.src/M000032.html" target="Code" class="method-signature"
|
704
|
+
onclick="popupCode('LongDecimalQuot.src/M000032.html');return false;">
|
705
705
|
<span class="method-name">to_f</span><span class="method-args">()</span>
|
706
706
|
</a>
|
707
707
|
</div>
|
@@ -713,12 +713,12 @@ convert into Float
|
|
713
713
|
</div>
|
714
714
|
</div>
|
715
715
|
|
716
|
-
<div id="method-
|
717
|
-
<a name="
|
716
|
+
<div id="method-M000033" class="method-detail">
|
717
|
+
<a name="M000033"></a>
|
718
718
|
|
719
719
|
<div class="method-heading">
|
720
|
-
<a href="LongDecimalQuot.src/
|
721
|
-
onclick="popupCode('LongDecimalQuot.src/
|
720
|
+
<a href="LongDecimalQuot.src/M000033.html" target="Code" class="method-signature"
|
721
|
+
onclick="popupCode('LongDecimalQuot.src/M000033.html');return false;">
|
722
722
|
<span class="method-name">to_i</span><span class="method-args">()</span>
|
723
723
|
</a>
|
724
724
|
</div>
|
@@ -730,12 +730,12 @@ convert into Integer
|
|
730
730
|
</div>
|
731
731
|
</div>
|
732
732
|
|
733
|
-
<div id="method-
|
734
|
-
<a name="
|
733
|
+
<div id="method-M000034" class="method-detail">
|
734
|
+
<a name="M000034"></a>
|
735
735
|
|
736
736
|
<div class="method-heading">
|
737
|
-
<a href="LongDecimalQuot.src/
|
738
|
-
onclick="popupCode('LongDecimalQuot.src/
|
737
|
+
<a href="LongDecimalQuot.src/M000034.html" target="Code" class="method-signature"
|
738
|
+
onclick="popupCode('LongDecimalQuot.src/M000034.html');return false;">
|
739
739
|
<span class="method-name">to_ld</span><span class="method-args">()</span>
|
740
740
|
</a>
|
741
741
|
</div>
|
@@ -748,12 +748,12 @@ scale
|
|
748
748
|
</div>
|
749
749
|
</div>
|
750
750
|
|
751
|
-
<div id="method-
|
752
|
-
<a name="
|
751
|
+
<div id="method-M000031" class="method-detail">
|
752
|
+
<a name="M000031"></a>
|
753
753
|
|
754
754
|
<div class="method-heading">
|
755
|
-
<a href="LongDecimalQuot.src/
|
756
|
-
onclick="popupCode('LongDecimalQuot.src/
|
755
|
+
<a href="LongDecimalQuot.src/M000031.html" target="Code" class="method-signature"
|
756
|
+
onclick="popupCode('LongDecimalQuot.src/M000031.html');return false;">
|
757
757
|
<span class="method-name">to_r</span><span class="method-args">()</span>
|
758
758
|
</a>
|
759
759
|
</div>
|
@@ -765,12 +765,12 @@ conversion to rational
|
|
765
765
|
</div>
|
766
766
|
</div>
|
767
767
|
|
768
|
-
<div id="method-
|
769
|
-
<a name="
|
768
|
+
<div id="method-M000030" class="method-detail">
|
769
|
+
<a name="M000030"></a>
|
770
770
|
|
771
771
|
<div class="method-heading">
|
772
|
-
<a href="LongDecimalQuot.src/
|
773
|
-
onclick="popupCode('LongDecimalQuot.src/
|
772
|
+
<a href="LongDecimalQuot.src/M000030.html" target="Code" class="method-signature"
|
773
|
+
onclick="popupCode('LongDecimalQuot.src/M000030.html');return false;">
|
774
774
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
775
775
|
</a>
|
776
776
|
</div>
|