long-decimal 0.00.12 → 0.00.13
Sign up to get free protection for your applications and to get access to all the features.
- data/README +69 -18
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/doc/classes/LongDecimalRoundingMode.html +2 -2
- data/doc/classes/LongDecimalRoundingMode/RoundingModeClass.html +2 -2
- data/doc/classes/LongDecimalRoundingMode/RoundingModeClass.src/M000135.html +1 -1
- data/doc/classes/LongMath.html +2 -2
- 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 +1 -1
- 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 +1 -1
- data/doc/classes/LongMath.src/M000017.html +1 -1
- data/doc/classes/LongMath.src/M000018.html +1 -1
- data/doc/classes/LongMath.src/M000019.html +1 -1
- data/doc/classes/LongMath.src/M000020.html +1 -1
- data/doc/classes/LongMath.src/M000021.html +1 -1
- data/doc/classes/LongMath.src/M000022.html +1 -1
- data/doc/classes/LongMath.src/M000023.html +1 -1
- data/doc/classes/LongMath.src/M000024.html +1 -1
- data/doc/classes/LongMath.src/M000025.html +1 -1
- data/doc/classes/LongMath/LongDecimal.html +2 -2
- data/doc/classes/LongMath/LongDecimal.src/M000060.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000061.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000062.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000063.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000064.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000065.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000066.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000067.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000068.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000069.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000070.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000071.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000072.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000073.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000074.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000075.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000076.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000077.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000078.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000079.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000080.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000081.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000082.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000083.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000085.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000086.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000087.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000088.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000089.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000090.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000091.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000092.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000093.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000094.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000095.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000096.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000097.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000098.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000099.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000100.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000101.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000102.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000103.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000104.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000105.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000106.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000107.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000108.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000109.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000110.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000111.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000112.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000113.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000114.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000115.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000116.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000117.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000119.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000121.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000122.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000123.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000124.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000125.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000126.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000129.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000130.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000131.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000132.html +1 -1
- data/doc/classes/LongMath/LongDecimal.src/M000133.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.html +2 -2
- data/doc/classes/LongMath/LongDecimalQuot.src/M000026.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000027.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000028.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000029.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000030.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000031.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000032.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000033.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000034.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000035.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000036.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000037.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000038.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000039.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000040.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000041.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000042.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000043.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000044.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000045.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000046.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000047.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000048.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000049.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000050.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000051.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000052.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000053.html +1 -1
- 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/M000058.html +1 -1
- data/doc/classes/LongMath/LongDecimalQuot.src/M000059.html +1 -1
- data/doc/classes/LongMath/Numeric.html +2 -2
- data/doc/classes/LongMath/Numeric.src/M000134.html +1 -1
- data/doc/created.rid +1 -1
- data/doc/dot/f_0.dot +1 -1
- data/doc/dot/f_0.png +0 -0
- data/doc/files/lib/{longdecimal_rb.html → long-decimal_rb.html} +7 -7
- data/doc/fr_file_index.html +1 -1
- data/doc/index.html +1 -1
- data/install.rb +1 -1
- data/lib/long-decimal.rb +2246 -0
- data/lib/longdecimal.rb +1 -1
- data/make_doc.rb +1 -1
- data/test/testlongdecimal.rb +6 -6
- data/version.rb +1 -1
- metadata +3 -149
- data/doc/classes/LongDecimal.html +0 -1432
- data/doc/classes/LongDecimal.src/M000040.html +0 -18
- data/doc/classes/LongDecimal.src/M000041.html +0 -18
- data/doc/classes/LongDecimal.src/M000042.html +0 -18
- data/doc/classes/LongDecimal.src/M000043.html +0 -18
- data/doc/classes/LongDecimal.src/M000044.html +0 -18
- data/doc/classes/LongDecimal.src/M000045.html +0 -18
- data/doc/classes/LongDecimal.src/M000046.html +0 -20
- data/doc/classes/LongDecimal.src/M000047.html +0 -109
- data/doc/classes/LongDecimal.src/M000048.html +0 -18
- data/doc/classes/LongDecimal.src/M000049.html +0 -18
- data/doc/classes/LongDecimal.src/M000050.html +0 -34
- data/doc/classes/LongDecimal.src/M000051.html +0 -41
- data/doc/classes/LongDecimal.src/M000052.html +0 -35
- data/doc/classes/LongDecimal.src/M000053.html +0 -18
- data/doc/classes/LongDecimal.src/M000054.html +0 -29
- data/doc/classes/LongDecimal.src/M000055.html +0 -18
- data/doc/classes/LongDecimal.src/M000056.html +0 -22
- data/doc/classes/LongDecimal.src/M000057.html +0 -18
- data/doc/classes/LongDecimal.src/M000058.html +0 -18
- data/doc/classes/LongDecimal.src/M000059.html +0 -20
- data/doc/classes/LongDecimal.src/M000060.html +0 -18
- data/doc/classes/LongDecimal.src/M000062.html +0 -29
- data/doc/classes/LongDecimal.src/M000063.html +0 -27
- data/doc/classes/LongDecimal.src/M000064.html +0 -18
- data/doc/classes/LongDecimal.src/M000066.html +0 -18
- data/doc/classes/LongDecimal.src/M000067.html +0 -18
- data/doc/classes/LongDecimal.src/M000068.html +0 -18
- data/doc/classes/LongDecimal.src/M000069.html +0 -18
- data/doc/classes/LongDecimal.src/M000070.html +0 -18
- data/doc/classes/LongDecimal.src/M000071.html +0 -22
- data/doc/classes/LongDecimal.src/M000072.html +0 -23
- data/doc/classes/LongDecimal.src/M000073.html +0 -23
- data/doc/classes/LongDecimal.src/M000074.html +0 -23
- data/doc/classes/LongDecimal.src/M000075.html +0 -18
- data/doc/classes/LongDecimal.src/M000076.html +0 -29
- data/doc/classes/LongDecimal.src/M000077.html +0 -23
- data/doc/classes/LongDecimal.src/M000078.html +0 -23
- data/doc/classes/LongDecimal.src/M000079.html +0 -34
- data/doc/classes/LongDecimal.src/M000080.html +0 -22
- data/doc/classes/LongDecimal.src/M000081.html +0 -19
- data/doc/classes/LongDecimal.src/M000082.html +0 -23
- data/doc/classes/LongDecimal.src/M000083.html +0 -23
- data/doc/classes/LongDecimal.src/M000084.html +0 -23
- data/doc/classes/LongDecimal.src/M000085.html +0 -18
- data/doc/classes/LongDecimal.src/M000086.html +0 -21
- data/doc/classes/LongDecimal.src/M000087.html +0 -21
- data/doc/classes/LongDecimal.src/M000088.html +0 -18
- data/doc/classes/LongDecimal.src/M000089.html +0 -18
- data/doc/classes/LongDecimal.src/M000090.html +0 -23
- data/doc/classes/LongDecimal.src/M000091.html +0 -23
- data/doc/classes/LongDecimal.src/M000092.html +0 -19
- data/doc/classes/LongDecimal.src/M000093.html +0 -23
- data/doc/classes/LongDecimal.src/M000094.html +0 -18
- data/doc/classes/LongDecimal.src/M000095.html +0 -30
- data/doc/classes/LongDecimal.src/M000096.html +0 -18
- data/doc/classes/LongDecimal.src/M000097.html +0 -18
- data/doc/classes/LongDecimal.src/M000098.html +0 -18
- data/doc/classes/LongDecimal.src/M000099.html +0 -23
- data/doc/classes/LongDecimal.src/M000100.html +0 -19
- data/doc/classes/LongDecimal.src/M000101.html +0 -18
- data/doc/classes/LongDecimal.src/M000102.html +0 -45
- data/doc/classes/LongDecimal.src/M000103.html +0 -18
- data/doc/classes/LongDecimal.src/M000104.html +0 -18
- data/doc/classes/LongDecimal.src/M000107.html +0 -18
- data/doc/classes/LongDecimal.src/M000108.html +0 -18
- data/doc/classes/LongDecimal.src/M000109.html +0 -18
- data/doc/classes/LongDecimal.src/M000110.html +0 -18
- data/doc/classes/LongDecimalQuot.html +0 -757
- data/doc/classes/LongDecimalQuot.src/M000003.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000004.html +0 -28
- data/doc/classes/LongDecimalQuot.src/M000005.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000006.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000007.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000008.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000009.html +0 -19
- data/doc/classes/LongDecimalQuot.src/M000010.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000011.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000012.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000013.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000014.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000015.html +0 -22
- data/doc/classes/LongDecimalQuot.src/M000016.html +0 -23
- data/doc/classes/LongDecimalQuot.src/M000017.html +0 -23
- data/doc/classes/LongDecimalQuot.src/M000018.html +0 -23
- data/doc/classes/LongDecimalQuot.src/M000019.html +0 -23
- data/doc/classes/LongDecimalQuot.src/M000020.html +0 -35
- data/doc/classes/LongDecimalQuot.src/M000021.html +0 -22
- data/doc/classes/LongDecimalQuot.src/M000022.html +0 -19
- data/doc/classes/LongDecimalQuot.src/M000023.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000024.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000025.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000026.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000027.html +0 -79
- data/doc/classes/LongDecimalQuot.src/M000028.html +0 -36
- data/doc/classes/LongDecimalQuot.src/M000029.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000030.html +0 -23
- data/doc/classes/LongDecimalQuot.src/M000031.html +0 -19
- data/doc/classes/LongDecimalQuot.src/M000032.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000033.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000034.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000037.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000038.html +0 -18
- data/doc/classes/LongDecimalQuot.src/M000039.html +0 -18
- data/doc/classes/LongDecimalRoundingMode/RoundingModeClass.src/M000122.html +0 -22
- data/doc/classes/LongDecimalRoundingMode/RoundingModeClass.src/M000128.html +0 -22
- data/doc/classes/LongDecimalRoundingMode/RoundingModeClass.src/M000133.html +0 -22
- data/doc/classes/LongDecimalRoundingMode/RoundingModeClass.src/M000136.html +0 -22
- data/doc/classes/LongMath.src/M000112.html +0 -19
- data/doc/classes/LongMath.src/M000113.html +0 -18
- data/doc/classes/LongMath.src/M000114.html +0 -18
- data/doc/classes/LongMath.src/M000115.html +0 -19
- data/doc/classes/LongMath.src/M000116.html +0 -18
- data/doc/classes/LongMath.src/M000117.html +0 -32
- data/doc/classes/LongMath.src/M000118.html +0 -32
- data/doc/classes/LongMath.src/M000119.html +0 -19
- data/doc/classes/LongMath.src/M000120.html +0 -43
- data/doc/classes/LongMath.src/M000121.html +0 -19
- data/doc/classes/LongMath.src/M000122.html +0 -73
- data/doc/classes/LongMath.src/M000123.html +0 -35
- data/doc/classes/LongMath.src/M000124.html +0 -50
- data/doc/classes/LongMath.src/M000125.html +0 -47
- data/doc/classes/LongMath.src/M000126.html +0 -21
- data/doc/classes/LongMath.src/M000127.html +0 -108
- data/doc/classes/LongMath/LongDecimal.src/M000058.html +0 -18
- data/doc/classes/LongMath/LongDecimal.src/M000059.html +0 -18
- data/doc/classes/LongMath/LongDecimal.src/M000084.html +0 -18
- data/doc/classes/LongMath/LongDecimal.src/M000118.html +0 -30
- data/doc/classes/LongMath/LongDecimal.src/M000120.html +0 -19
- data/doc/classes/LongMath/LongDecimal.src/M000127.html +0 -19
- data/doc/classes/LongMath/LongDecimal.src/M000128.html +0 -18
- data/doc/classes/LongMath/LongDecimal.src/M000134.html +0 -18
- data/doc/classes/LongMath/LongDecimalQuot.src/M000024.html +0 -18
- data/doc/classes/LongMath/LongDecimalQuot.src/M000025.html +0 -28
- data/doc/classes/LongMath/LongDecimalQuot.src/M000056.html +0 -18
- data/doc/classes/LongMath/LongDecimalQuot.src/M000057.html +0 -18
- data/doc/classes/LongMath/LongDecimalQuot.src/M000060.html +0 -18
- data/doc/classes/LongMath/Numeric.src/M000132.html +0 -18
- data/doc/classes/LongMath/Numeric.src/M000135.html +0 -18
- data/doc/classes/Numeric.html +0 -149
- data/doc/classes/Numeric.src/M000111.html +0 -18
- data/doc/files/lib/longdecimal_rb.src/M000001.html +0 -22
- data/doc/files/lib/longdecimal_rb.src/M000002.html +0 -18
@@ -1,18 +0,0 @@
|
|
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>new! (LongDecimalQuot)</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 1338</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">LongDecimalQuot</span>.<span class="ruby-identifier">new!</span>(<span class="ruby-identifier">first</span>, <span class="ruby-identifier">second</span>)
|
15
|
-
<span class="ruby-identifier">new</span>(<span class="ruby-identifier">first</span>, <span class="ruby-identifier">second</span>)
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,28 +0,0 @@
|
|
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>new (LongDecimalQuot)</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 1345</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">first</span>, <span class="ruby-identifier">second</span>)
|
15
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">first</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Rational</span>) <span class="ruby-operator">&&</span> (<span class="ruby-identifier">second</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Integer</span>) <span class="ruby-keyword kw">then</span>
|
16
|
-
<span class="ruby-ivar">@rat</span> = <span class="ruby-constant">Rational</span>(<span class="ruby-identifier">first</span>.<span class="ruby-identifier">numerator</span>, <span class="ruby-identifier">first</span>.<span class="ruby-identifier">denominator</span>)
|
17
|
-
<span class="ruby-ivar">@scale</span> = <span class="ruby-identifier">second</span>
|
18
|
-
<span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">first</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span>) <span class="ruby-operator">&&</span> (<span class="ruby-identifier">second</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">LongDecimal</span>) <span class="ruby-keyword kw">then</span>
|
19
|
-
<span class="ruby-identifier">orig_scale</span> = <span class="ruby-identifier">first</span>.<span class="ruby-identifier">scale</span>
|
20
|
-
<span class="ruby-identifier">first</span>, <span class="ruby-identifier">second</span> = <span class="ruby-identifier">first</span>.<span class="ruby-identifier">anti_equalize_scale</span>(<span class="ruby-identifier">second</span>)
|
21
|
-
<span class="ruby-ivar">@rat</span> = <span class="ruby-constant">Rational</span>(<span class="ruby-identifier">first</span>.<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">second</span>.<span class="ruby-identifier">to_i</span>)
|
22
|
-
<span class="ruby-ivar">@scale</span> = <span class="ruby-identifier">orig_scale</span>
|
23
|
-
<span class="ruby-keyword kw">else</span>
|
24
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">"parameters must be (LongDecimal, LongDecimal) or (Rational, Integer): first=#{first.inspect} second=#{second.inspect}"</span>;
|
25
|
-
<span class="ruby-keyword kw">end</span>
|
26
|
-
<span class="ruby-keyword kw">end</span></pre>
|
27
|
-
</body>
|
28
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
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>scale (LongDecimalQuot)</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 1360</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scale</span>
|
15
|
-
<span class="ruby-ivar">@scale</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
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>rat (LongDecimalQuot)</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 1364</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rat</span>
|
15
|
-
<span class="ruby-ivar">@rat</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
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>numerator (LongDecimalQuot)</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 1368</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">numerator</span>
|
15
|
-
<span class="ruby-identifier">rat</span>.<span class="ruby-identifier">numerator</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
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>denominator (LongDecimalQuot)</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 1372</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">denominator</span>
|
15
|
-
<span class="ruby-identifier">rat</span>.<span class="ruby-identifier">denominator</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,19 +0,0 @@
|
|
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>to_s (LongDecimalQuot)</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 1385</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
15
|
-
<span class="ruby-identifier">str</span> = <span class="ruby-ivar">@rat</span>.<span class="ruby-identifier">to_s</span>
|
16
|
-
<span class="ruby-identifier">str</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"["</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">scale</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"]"</span>
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
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>to_r (LongDecimalQuot)</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 1390</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_r</span>
|
15
|
-
<span class="ruby-constant">Rational</span>(<span class="ruby-identifier">numerator</span>, <span class="ruby-identifier">denominator</span>)
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
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>to_f (LongDecimalQuot)</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 1395</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_f</span>
|
15
|
-
<span class="ruby-identifier">to_r</span>.<span class="ruby-identifier">to_f</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
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>to_i (LongDecimalQuot)</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 1400</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_i</span>
|
15
|
-
<span class="ruby-identifier">to_r</span>.<span class="ruby-identifier">to_i</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
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>to_ld (LongDecimalQuot)</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 1404</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ld</span>
|
15
|
-
<span class="ruby-constant">LongDecimal</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">scale</span>)
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
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>+@ (LongDecimalQuot)</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 1408</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">+@</span>
|
15
|
-
<span class="ruby-keyword kw">self</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,22 +0,0 @@
|
|
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>-@ (LongDecimalQuot)</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 1412</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">-@</span>
|
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
|
-
<span class="ruby-keyword kw">self</span>
|
17
|
-
<span class="ruby-keyword kw">else</span>
|
18
|
-
<span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-operator">-</span><span class="ruby-identifier">rat</span>, <span class="ruby-identifier">scale</span>)
|
19
|
-
<span class="ruby-keyword kw">end</span>
|
20
|
-
<span class="ruby-keyword kw">end</span></pre>
|
21
|
-
</body>
|
22
|
-
</html>
|
@@ -1,23 +0,0 @@
|
|
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>+ (LongDecimalQuot)</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 1420</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">o</span>, <span class="ruby-identifier">s</span> = <span class="ruby-identifier">coerce</span>(<span class="ruby-identifier">other</span>)
|
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">LongDecimalQuot</span>) <span class="ruby-keyword kw">then</span>
|
17
|
-
<span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">rat</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">rat</span>, [<span class="ruby-identifier">s</span>.<span class="ruby-identifier">scale</span>, <span class="ruby-identifier">o</span>.<span class="ruby-identifier">scale</span>].<span class="ruby-identifier">max</span>)
|
18
|
-
<span class="ruby-keyword kw">else</span>
|
19
|
-
<span class="ruby-identifier">s</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">o</span>
|
20
|
-
<span class="ruby-keyword kw">end</span>
|
21
|
-
<span class="ruby-keyword kw">end</span></pre>
|
22
|
-
</body>
|
23
|
-
</html>
|
@@ -1,23 +0,0 @@
|
|
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>- (LongDecimalQuot)</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 1429</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">o</span>, <span class="ruby-identifier">s</span> = <span class="ruby-identifier">coerce</span>(<span class="ruby-identifier">other</span>)
|
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">LongDecimalQuot</span>) <span class="ruby-keyword kw">then</span>
|
17
|
-
<span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">rat</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">rat</span>, [<span class="ruby-identifier">s</span>.<span class="ruby-identifier">scale</span>, <span class="ruby-identifier">o</span>.<span class="ruby-identifier">scale</span>].<span class="ruby-identifier">max</span>)
|
18
|
-
<span class="ruby-keyword kw">else</span>
|
19
|
-
<span class="ruby-identifier">s</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">o</span>
|
20
|
-
<span class="ruby-keyword kw">end</span>
|
21
|
-
<span class="ruby-keyword kw">end</span></pre>
|
22
|
-
</body>
|
23
|
-
</html>
|
@@ -1,23 +0,0 @@
|
|
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>* (LongDecimalQuot)</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 1438</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">o</span>, <span class="ruby-identifier">s</span> = <span class="ruby-identifier">coerce</span>(<span class="ruby-identifier">other</span>)
|
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">LongDecimalQuot</span>) <span class="ruby-keyword kw">then</span>
|
17
|
-
<span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">rat</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">rat</span>, <span class="ruby-identifier">s</span>.<span class="ruby-identifier">scale</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">scale</span>)
|
18
|
-
<span class="ruby-keyword kw">else</span>
|
19
|
-
<span class="ruby-identifier">s</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">o</span>
|
20
|
-
<span class="ruby-keyword kw">end</span>
|
21
|
-
<span class="ruby-keyword kw">end</span></pre>
|
22
|
-
</body>
|
23
|
-
</html>
|
@@ -1,23 +0,0 @@
|
|
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>/ (LongDecimalQuot)</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 1447</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">o</span>, <span class="ruby-identifier">s</span> = <span class="ruby-identifier">coerce</span>(<span class="ruby-identifier">other</span>)
|
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">LongDecimalQuot</span>) <span class="ruby-keyword kw">then</span>
|
17
|
-
<span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">rat</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">rat</span>, <span class="ruby-identifier">scale</span>)
|
18
|
-
<span class="ruby-keyword kw">else</span>
|
19
|
-
<span class="ruby-identifier">s</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">o</span>
|
20
|
-
<span class="ruby-keyword kw">end</span>
|
21
|
-
<span class="ruby-keyword kw">end</span></pre>
|
22
|
-
</body>
|
23
|
-
</html>
|
@@ -1,35 +0,0 @@
|
|
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>** (LongDecimalQuot)</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 1456</span>
|
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> (<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>) <span class="ruby-keyword kw">then</span>
|
16
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">is_int?</span> <span class="ruby-keyword kw">then</span>
|
17
|
-
<span class="ruby-identifier">other</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_i</span>
|
18
|
-
<span class="ruby-keyword kw">else</span>
|
19
|
-
<span class="ruby-identifier">other</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_r</span>
|
20
|
-
<span class="ruby-keyword kw">end</span>
|
21
|
-
<span class="ruby-keyword kw">end</span>
|
22
|
-
<span class="ruby-identifier">rat_result</span> = <span class="ruby-identifier">rat</span> <span class="ruby-operator">**</span> <span class="ruby-identifier">other</span>
|
23
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">rat_result</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Rational</span>) <span class="ruby-keyword kw">then</span>
|
24
|
-
<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-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>
|
25
|
-
<span class="ruby-identifier">new_scale</span> = <span class="ruby-identifier">scale</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">other</span>
|
26
|
-
<span class="ruby-keyword kw">else</span>
|
27
|
-
<span class="ruby-identifier">new_scale</span> = <span class="ruby-identifier">scale</span>
|
28
|
-
<span class="ruby-keyword kw">end</span>
|
29
|
-
<span class="ruby-constant">LongDecimalQuot</span>(<span class="ruby-identifier">rat_result</span>, <span class="ruby-identifier">new_scale</span>)
|
30
|
-
<span class="ruby-keyword kw">else</span>
|
31
|
-
<span class="ruby-identifier">rat_result</span>
|
32
|
-
<span class="ruby-keyword kw">end</span>
|
33
|
-
<span class="ruby-keyword kw">end</span></pre>
|
34
|
-
</body>
|
35
|
-
</html>
|
@@ -1,22 +0,0 @@
|
|
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>divmod (LongDecimalQuot)</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 1477</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">divmod</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">Complex</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">"divmod not supported for Complex"</span>
|
17
|
-
<span class="ruby-keyword kw">end</span>
|
18
|
-
<span class="ruby-identifier">q</span> = (<span class="ruby-keyword kw">self</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">other</span>).<span class="ruby-identifier">to_i</span>
|
19
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">q</span>, <span class="ruby-keyword kw">self</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">other</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">q</span>
|
20
|
-
<span class="ruby-keyword kw">end</span></pre>
|
21
|
-
</body>
|
22
|
-
</html>
|
@@ -1,19 +0,0 @@
|
|
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>% (LongDecimalQuot)</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 1485</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">q</span>, <span class="ruby-identifier">r</span> = <span class="ruby-identifier">divmod</span> <span class="ruby-identifier">other</span>
|
16
|
-
<span class="ruby-identifier">r</span>
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|