long-decimal 0.00.14 → 0.00.15
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 -5
- data/VERSION +1 -1
- data/doc/classes/LongDecimalRoundingMode/RoundingModeClass.html +6 -6
- data/doc/classes/LongDecimalRoundingMode.html +3 -2
- data/doc/classes/LongMath.html +137 -191
- data/doc/created.rid +1 -1
- data/doc/dot/f_0.dot +44 -44
- data/doc/dot/f_0.png +0 -0
- data/doc/dot/m_0_0.dot +7 -50
- data/doc/dot/m_0_0.png +0 -0
- data/doc/files/lib/long-decimal_rb.html +58 -6
- data/doc/fr_class_index.html +3 -3
- data/doc/fr_method_index.html +136 -135
- data/lib/long-decimal.rb +1658 -1601
- data/test/testlongdecimal.rb +317 -12
- metadata +2 -2
data/doc/classes/LongMath.html
CHANGED
@@ -73,11 +73,8 @@
|
|
73
73
|
<div id="contextContent">
|
74
74
|
<div id="diagram">
|
75
75
|
<map id="map" name="map">
|
76
|
-
<area shape="RECT" coords="
|
77
|
-
<area shape="RECT" coords="
|
78
|
-
<area shape="RECT" coords="165,198,259,246" href="LongMath/LongDecimal.html" alt="LongDecimal">
|
79
|
-
<area shape="RECT" coords="181,102,253,150" href="LongMath/Numeric.html" alt="Numeric">
|
80
|
-
<area shape="RECT" coords="16,68,269,256" href="LongMath.html" alt="LongMath">
|
76
|
+
<area shape="RECT" coords="5,5,160,53" href="LongDecimalRoundingMode.html" alt="LongDecimalRoundingMode">
|
77
|
+
<area shape="RECT" coords="36,68,129,115" href="LongMath.html" alt="LongMath">
|
81
78
|
</map>
|
82
79
|
<img src="../dot/m_0_0.png" usemap="#map" border=0 alt="Module: LongMath">
|
83
80
|
</div>
|
@@ -85,12 +82,12 @@
|
|
85
82
|
<div id="description">
|
86
83
|
<p>
|
87
84
|
<a href="LongMath.html">LongMath</a> provides some helper functions to
|
88
|
-
support <a href="
|
89
|
-
href="
|
85
|
+
support <a href="LongDecimal.html">LongDecimal</a> and <a
|
86
|
+
href="LongDecimalQuot.html">LongDecimalQuot</a>, mostly operating on
|
90
87
|
integers. They are used internally here, but possibly they can be used
|
91
88
|
elsewhere as well. In addition <a href="LongMath.html">LongMath</a>
|
92
89
|
provides methods like those in Math, but for <a
|
93
|
-
href="
|
90
|
+
href="LongDecimal.html">LongDecimal</a> instead of Float.
|
94
91
|
</p>
|
95
92
|
|
96
93
|
</div>
|
@@ -102,31 +99,29 @@ href="LongMath.html#M000024">LongDecimal</a> instead of Float.
|
|
102
99
|
<h3 class="section-bar">Methods</h3>
|
103
100
|
|
104
101
|
<div class="name-list">
|
105
|
-
<a href="#
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
108
|
-
<a href="#
|
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="#M000010">sqrtw</a>
|
129
|
-
<a href="#M000011">sqrtw_with_remainder</a>
|
102
|
+
<a href="#M000128">calc_iprec_for_exp</a>
|
103
|
+
<a href="#M000126">calc_pi</a>
|
104
|
+
<a href="#M000114">check_is_int</a>
|
105
|
+
<a href="#M000115">check_is_ld</a>
|
106
|
+
<a href="#M000117">check_is_mode</a>
|
107
|
+
<a href="#M000116">check_is_prec</a>
|
108
|
+
<a href="#M000113">check_word_len</a>
|
109
|
+
<a href="#M000127">exp</a>
|
110
|
+
<a href="#M000129">exp_internal</a>
|
111
|
+
<a href="#M000124">gcd_with_high_power</a>
|
112
|
+
<a href="#M000130">log</a>
|
113
|
+
<a href="#M000131">log10</a>
|
114
|
+
<a href="#M000132">log2</a>
|
115
|
+
<a href="#M000133">log_internal</a>
|
116
|
+
<a href="#M000119">merge_from_words</a>
|
117
|
+
<a href="#M000125">multiplicity_of_factor</a>
|
118
|
+
<a href="#M000134">power</a>
|
119
|
+
<a href="#M000135">power_internal</a>
|
120
|
+
<a href="#M000118">split_to_words</a>
|
121
|
+
<a href="#M000120">sqrtb</a>
|
122
|
+
<a href="#M000121">sqrtb_with_remainder</a>
|
123
|
+
<a href="#M000122">sqrtw</a>
|
124
|
+
<a href="#M000123">sqrtw_with_remainder</a>
|
130
125
|
</div>
|
131
126
|
</div>
|
132
127
|
|
@@ -144,14 +139,6 @@ href="LongMath.html#M000024">LongDecimal</a> instead of Float.
|
|
144
139
|
|
145
140
|
<div id="section">
|
146
141
|
|
147
|
-
<div id="class-list">
|
148
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
149
|
-
|
150
|
-
Class <a href="LongMath/LongDecimal.html" class="link">LongMath::LongDecimal</a><br />
|
151
|
-
Class <a href="LongMath/LongDecimalQuot.html" class="link">LongMath::LongDecimalQuot</a><br />
|
152
|
-
Class <a href="LongMath/Numeric.html" class="link">LongMath::Numeric</a><br />
|
153
|
-
|
154
|
-
</div>
|
155
142
|
|
156
143
|
<div id="constants-list">
|
157
144
|
<h3 class="section-bar">Constants</h3>
|
@@ -191,12 +178,12 @@ Class <a href="LongMath/Numeric.html" class="link">LongMath::Numeric</a><br />
|
|
191
178
|
<div id="methods">
|
192
179
|
<h3 class="section-bar">Public Class methods</h3>
|
193
180
|
|
194
|
-
<div id="method-
|
195
|
-
<a name="
|
181
|
+
<div id="method-M000128" class="method-detail">
|
182
|
+
<a name="M000128"></a>
|
196
183
|
|
197
184
|
<div class="method-heading">
|
198
|
-
<a href="LongMath.src/
|
199
|
-
onclick="popupCode('LongMath.src/
|
185
|
+
<a href="LongMath.src/M000128.html" target="Code" class="method-signature"
|
186
|
+
onclick="popupCode('LongMath.src/M000128.html');return false;">
|
200
187
|
<span class="method-name">calc_iprec_for_exp</span><span class="method-args">(x, prec)</span>
|
201
188
|
</a>
|
202
189
|
</div>
|
@@ -208,12 +195,12 @@ private helper method for exponentiation calculate internal precision
|
|
208
195
|
</div>
|
209
196
|
</div>
|
210
197
|
|
211
|
-
<div id="method-
|
212
|
-
<a name="
|
198
|
+
<div id="method-M000126" class="method-detail">
|
199
|
+
<a name="M000126"></a>
|
213
200
|
|
214
201
|
<div class="method-heading">
|
215
|
-
<a href="LongMath.src/
|
216
|
-
onclick="popupCode('LongMath.src/
|
202
|
+
<a href="LongMath.src/M000126.html" target="Code" class="method-signature"
|
203
|
+
onclick="popupCode('LongMath.src/M000126.html');return false;">
|
217
204
|
<span class="method-name">calc_pi</span><span class="method-args">(prec, final_mode = LongDecimal::ROUND_HALF_DOWN)</span>
|
218
205
|
</a>
|
219
206
|
</div>
|
@@ -225,19 +212,19 @@ point. It works fine for 1000 or 2000 digits or so. This method could be
|
|
225
212
|
optimized more, but if you really want to go for more digits, you will find
|
226
213
|
a specialized and optimized program for this specific purpose, probably
|
227
214
|
written in C or C++. Since calculation of pi is not what should typically
|
228
|
-
be done with <a href="
|
229
|
-
|
230
|
-
href="
|
215
|
+
be done with <a href="LongDecimal.html">LongDecimal</a>, you may consider
|
216
|
+
this method to be the easter egg of <a
|
217
|
+
href="LongDecimal.html">LongDecimal</a>. ;-)
|
231
218
|
</p>
|
232
219
|
</div>
|
233
220
|
</div>
|
234
221
|
|
235
|
-
<div id="method-
|
236
|
-
<a name="
|
222
|
+
<div id="method-M000114" class="method-detail">
|
223
|
+
<a name="M000114"></a>
|
237
224
|
|
238
225
|
<div class="method-heading">
|
239
|
-
<a href="LongMath.src/
|
240
|
-
onclick="popupCode('LongMath.src/
|
226
|
+
<a href="LongMath.src/M000114.html" target="Code" class="method-signature"
|
227
|
+
onclick="popupCode('LongMath.src/M000114.html');return false;">
|
241
228
|
<span class="method-name">check_is_int</span><span class="method-args">(x, name="x")</span>
|
242
229
|
</a>
|
243
230
|
</div>
|
@@ -249,12 +236,12 @@ helper method for internal use: checks if parameter x is an Integer
|
|
249
236
|
</div>
|
250
237
|
</div>
|
251
238
|
|
252
|
-
<div id="method-
|
253
|
-
<a name="
|
239
|
+
<div id="method-M000115" class="method-detail">
|
240
|
+
<a name="M000115"></a>
|
254
241
|
|
255
242
|
<div class="method-heading">
|
256
|
-
<a href="LongMath.src/
|
257
|
-
onclick="popupCode('LongMath.src/
|
243
|
+
<a href="LongMath.src/M000115.html" target="Code" class="method-signature"
|
244
|
+
onclick="popupCode('LongMath.src/M000115.html');return false;">
|
258
245
|
<span class="method-name">check_is_ld</span><span class="method-args">(x, name="x")</span>
|
259
246
|
</a>
|
260
247
|
</div>
|
@@ -262,17 +249,17 @@ helper method for internal use: checks if parameter x is an Integer
|
|
262
249
|
<div class="method-description">
|
263
250
|
<p>
|
264
251
|
helper method for internal use: checks if parameter x is a <a
|
265
|
-
href="
|
252
|
+
href="LongDecimal.html">LongDecimal</a>
|
266
253
|
</p>
|
267
254
|
</div>
|
268
255
|
</div>
|
269
256
|
|
270
|
-
<div id="method-
|
271
|
-
<a name="
|
257
|
+
<div id="method-M000117" class="method-detail">
|
258
|
+
<a name="M000117"></a>
|
272
259
|
|
273
260
|
<div class="method-heading">
|
274
|
-
<a href="LongMath.src/
|
275
|
-
onclick="popupCode('LongMath.src/
|
261
|
+
<a href="LongMath.src/M000117.html" target="Code" class="method-signature"
|
262
|
+
onclick="popupCode('LongMath.src/M000117.html');return false;">
|
276
263
|
<span class="method-name">check_is_mode</span><span class="method-args">(mode, name="mode")</span>
|
277
264
|
</a>
|
278
265
|
</div>
|
@@ -285,12 +272,12 @@ helper method for internal use: checks if parameter x is a rounding mode
|
|
285
272
|
</div>
|
286
273
|
</div>
|
287
274
|
|
288
|
-
<div id="method-
|
289
|
-
<a name="
|
275
|
+
<div id="method-M000116" class="method-detail">
|
276
|
+
<a name="M000116"></a>
|
290
277
|
|
291
278
|
<div class="method-heading">
|
292
|
-
<a href="LongMath.src/
|
293
|
-
onclick="popupCode('LongMath.src/
|
279
|
+
<a href="LongMath.src/M000116.html" target="Code" class="method-signature"
|
280
|
+
onclick="popupCode('LongMath.src/M000116.html');return false;">
|
294
281
|
<span class="method-name">check_is_prec</span><span class="method-args">(prec, name="prec")</span>
|
295
282
|
</a>
|
296
283
|
</div>
|
@@ -298,18 +285,17 @@ helper method for internal use: checks if parameter x is a rounding mode
|
|
298
285
|
<div class="method-description">
|
299
286
|
<p>
|
300
287
|
helper method for internal use: checks if parameter x is a reasonable value
|
301
|
-
for the precision (scale) of a <a
|
302
|
-
href="LongMath.html#M000024">LongDecimal</a>
|
288
|
+
for the precision (scale) of a <a href="LongDecimal.html">LongDecimal</a>
|
303
289
|
</p>
|
304
290
|
</div>
|
305
291
|
</div>
|
306
292
|
|
307
|
-
<div id="method-
|
308
|
-
<a name="
|
293
|
+
<div id="method-M000113" class="method-detail">
|
294
|
+
<a name="M000113"></a>
|
309
295
|
|
310
296
|
<div class="method-heading">
|
311
|
-
<a href="LongMath.src/
|
312
|
-
onclick="popupCode('LongMath.src/
|
297
|
+
<a href="LongMath.src/M000113.html" target="Code" class="method-signature"
|
298
|
+
onclick="popupCode('LongMath.src/M000113.html');return false;">
|
313
299
|
<span class="method-name">check_word_len</span><span class="method-args">(word_len, name="word_len")</span>
|
314
300
|
</a>
|
315
301
|
</div>
|
@@ -322,12 +308,12 @@ splitting a number into parts
|
|
322
308
|
</div>
|
323
309
|
</div>
|
324
310
|
|
325
|
-
<div id="method-
|
326
|
-
<a name="
|
311
|
+
<div id="method-M000127" class="method-detail">
|
312
|
+
<a name="M000127"></a>
|
327
313
|
|
328
314
|
<div class="method-heading">
|
329
|
-
<a href="LongMath.src/
|
330
|
-
onclick="popupCode('LongMath.src/
|
315
|
+
<a href="LongMath.src/M000127.html" target="Code" class="method-signature"
|
316
|
+
onclick="popupCode('LongMath.src/M000127.html');return false;">
|
331
317
|
<span class="method-name">exp</span><span class="method-args">(x, prec, mode = LongDecimal::ROUND_HALF_DOWN)</span>
|
332
318
|
</a>
|
333
319
|
</div>
|
@@ -335,21 +321,21 @@ splitting a number into parts
|
|
335
321
|
<div class="method-description">
|
336
322
|
<p>
|
337
323
|
calc the exponential function of x to the given precision as <a
|
338
|
-
href="
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
324
|
+
href="LongDecimal.html">LongDecimal</a>. Only supports values of x such
|
325
|
+
that the result still fits into a float (x <= 709). This limitation is
|
326
|
+
somewhat arbitrary, but it is enforced in order to avoid producing numbers
|
327
|
+
with the exponential function that exceed the memory. It may be removed in
|
328
|
+
future versions.
|
343
329
|
</p>
|
344
330
|
</div>
|
345
331
|
</div>
|
346
332
|
|
347
|
-
<div id="method-
|
348
|
-
<a name="
|
333
|
+
<div id="method-M000129" class="method-detail">
|
334
|
+
<a name="M000129"></a>
|
349
335
|
|
350
336
|
<div class="method-heading">
|
351
|
-
<a href="LongMath.src/
|
352
|
-
onclick="popupCode('LongMath.src/
|
337
|
+
<a href="LongMath.src/M000129.html" target="Code" class="method-signature"
|
338
|
+
onclick="popupCode('LongMath.src/M000129.html');return false;">
|
353
339
|
<span class="method-name">exp_internal</span><span class="method-args">(x, prec = nil, final_mode = LongDecimal::ROUND_HALF_DOWN, j = nil, k = nil, iprec = nil, mode = LongDecimal::ROUND_HALF_DOWN)</span>
|
354
340
|
</a>
|
355
341
|
</div>
|
@@ -364,12 +350,12 @@ if the default settings for the parameters do not work correctly
|
|
364
350
|
</div>
|
365
351
|
</div>
|
366
352
|
|
367
|
-
<div id="method-
|
368
|
-
<a name="
|
353
|
+
<div id="method-M000124" class="method-detail">
|
354
|
+
<a name="M000124"></a>
|
369
355
|
|
370
356
|
<div class="method-heading">
|
371
|
-
<a href="LongMath.src/
|
372
|
-
onclick="popupCode('LongMath.src/
|
357
|
+
<a href="LongMath.src/M000124.html" target="Code" class="method-signature"
|
358
|
+
onclick="popupCode('LongMath.src/M000124.html');return false;">
|
373
359
|
<span class="method-name">gcd_with_high_power</span><span class="method-args">(x, b)</span>
|
374
360
|
</a>
|
375
361
|
</div>
|
@@ -382,12 +368,12 @@ exponent such that gcd(x, b**m) = gcd(x, b**n) for all m, n >= n0
|
|
382
368
|
</div>
|
383
369
|
</div>
|
384
370
|
|
385
|
-
<div id="method-
|
386
|
-
<a name="
|
371
|
+
<div id="method-M000130" class="method-detail">
|
372
|
+
<a name="M000130"></a>
|
387
373
|
|
388
374
|
<div class="method-heading">
|
389
|
-
<a href="LongMath.src/
|
390
|
-
onclick="popupCode('LongMath.src/
|
375
|
+
<a href="LongMath.src/M000130.html" target="Code" class="method-signature"
|
376
|
+
onclick="popupCode('LongMath.src/M000130.html');return false;">
|
391
377
|
<span class="method-name">log</span><span class="method-args">(x, prec, mode = LongDecimal::ROUND_HALF_DOWN)</span>
|
392
378
|
</a>
|
393
379
|
</div>
|
@@ -395,17 +381,17 @@ exponent such that gcd(x, b**m) = gcd(x, b**n) for all m, n >= n0
|
|
395
381
|
<div class="method-description">
|
396
382
|
<p>
|
397
383
|
calculate the natural logarithm function of x to the given precision as <a
|
398
|
-
href="
|
384
|
+
href="LongDecimal.html">LongDecimal</a>.
|
399
385
|
</p>
|
400
386
|
</div>
|
401
387
|
</div>
|
402
388
|
|
403
|
-
<div id="method-
|
404
|
-
<a name="
|
389
|
+
<div id="method-M000131" class="method-detail">
|
390
|
+
<a name="M000131"></a>
|
405
391
|
|
406
392
|
<div class="method-heading">
|
407
|
-
<a href="LongMath.src/
|
408
|
-
onclick="popupCode('LongMath.src/
|
393
|
+
<a href="LongMath.src/M000131.html" target="Code" class="method-signature"
|
394
|
+
onclick="popupCode('LongMath.src/M000131.html');return false;">
|
409
395
|
<span class="method-name">log10</span><span class="method-args">(x, prec, mode = LongDecimal::ROUND_HALF_DOWN)</span>
|
410
396
|
</a>
|
411
397
|
</div>
|
@@ -413,17 +399,17 @@ href="LongMath.html#M000024">LongDecimal</a>.
|
|
413
399
|
<div class="method-description">
|
414
400
|
<p>
|
415
401
|
calculate the base 10 logarithm of x to the given precision as <a
|
416
|
-
href="
|
402
|
+
href="LongDecimal.html">LongDecimal</a>.
|
417
403
|
</p>
|
418
404
|
</div>
|
419
405
|
</div>
|
420
406
|
|
421
|
-
<div id="method-
|
422
|
-
<a name="
|
407
|
+
<div id="method-M000132" class="method-detail">
|
408
|
+
<a name="M000132"></a>
|
423
409
|
|
424
410
|
<div class="method-heading">
|
425
|
-
<a href="LongMath.src/
|
426
|
-
onclick="popupCode('LongMath.src/
|
411
|
+
<a href="LongMath.src/M000132.html" target="Code" class="method-signature"
|
412
|
+
onclick="popupCode('LongMath.src/M000132.html');return false;">
|
427
413
|
<span class="method-name">log2</span><span class="method-args">(x, prec, mode = LongDecimal::ROUND_HALF_DOWN)</span>
|
428
414
|
</a>
|
429
415
|
</div>
|
@@ -431,17 +417,17 @@ href="LongMath.html#M000024">LongDecimal</a>.
|
|
431
417
|
<div class="method-description">
|
432
418
|
<p>
|
433
419
|
calculate the base 2 logarithm of x to the given precision as <a
|
434
|
-
href="
|
420
|
+
href="LongDecimal.html">LongDecimal</a>.
|
435
421
|
</p>
|
436
422
|
</div>
|
437
423
|
</div>
|
438
424
|
|
439
|
-
<div id="method-
|
440
|
-
<a name="
|
425
|
+
<div id="method-M000133" class="method-detail">
|
426
|
+
<a name="M000133"></a>
|
441
427
|
|
442
428
|
<div class="method-heading">
|
443
|
-
<a href="LongMath.src/
|
444
|
-
onclick="popupCode('LongMath.src/
|
429
|
+
<a href="LongMath.src/M000133.html" target="Code" class="method-signature"
|
430
|
+
onclick="popupCode('LongMath.src/M000133.html');return false;">
|
445
431
|
<span class="method-name">log_internal</span><span class="method-args">(x, prec = nil, final_mode = LongDecimal::ROUND_HALF_DOWN, iprec = nil, mode = LongDecimal::ROUND_HALF_DOWN)</span>
|
446
432
|
</a>
|
447
433
|
</div>
|
@@ -456,12 +442,12 @@ if the default settings for the parameters do not work correctly
|
|
456
442
|
</div>
|
457
443
|
</div>
|
458
444
|
|
459
|
-
<div id="method-
|
460
|
-
<a name="
|
445
|
+
<div id="method-M000119" class="method-detail">
|
446
|
+
<a name="M000119"></a>
|
461
447
|
|
462
448
|
<div class="method-heading">
|
463
|
-
<a href="LongMath.src/
|
464
|
-
onclick="popupCode('LongMath.src/
|
449
|
+
<a href="LongMath.src/M000119.html" target="Code" class="method-signature"
|
450
|
+
onclick="popupCode('LongMath.src/M000119.html');return false;">
|
465
451
|
<span class="method-name">merge_from_words</span><span class="method-args">(words, word_len = 32)</span>
|
466
452
|
</a>
|
467
453
|
</div>
|
@@ -469,17 +455,17 @@ if the default settings for the parameters do not work correctly
|
|
469
455
|
<div class="method-description">
|
470
456
|
<p>
|
471
457
|
concatenate numbers given in words as bit patterns (the opposite of <a
|
472
|
-
href="LongMath.html#
|
458
|
+
href="LongMath.html#M000118">split_to_words</a>)
|
473
459
|
</p>
|
474
460
|
</div>
|
475
461
|
</div>
|
476
462
|
|
477
|
-
<div id="method-
|
478
|
-
<a name="
|
463
|
+
<div id="method-M000125" class="method-detail">
|
464
|
+
<a name="M000125"></a>
|
479
465
|
|
480
466
|
<div class="method-heading">
|
481
|
-
<a href="LongMath.src/
|
482
|
-
onclick="popupCode('LongMath.src/
|
467
|
+
<a href="LongMath.src/M000125.html" target="Code" class="method-signature"
|
468
|
+
onclick="popupCode('LongMath.src/M000125.html');return false;">
|
483
469
|
<span class="method-name">multiplicity_of_factor</span><span class="method-args">(x, prime_number)</span>
|
484
470
|
</a>
|
485
471
|
</div>
|
@@ -496,12 +482,12 @@ that exceed the range of Float
|
|
496
482
|
</div>
|
497
483
|
</div>
|
498
484
|
|
499
|
-
<div id="method-
|
500
|
-
<a name="
|
485
|
+
<div id="method-M000134" class="method-detail">
|
486
|
+
<a name="M000134"></a>
|
501
487
|
|
502
488
|
<div class="method-heading">
|
503
|
-
<a href="LongMath.src/
|
504
|
-
onclick="popupCode('LongMath.src/
|
489
|
+
<a href="LongMath.src/M000134.html" target="Code" class="method-signature"
|
490
|
+
onclick="popupCode('LongMath.src/M000134.html');return false;">
|
505
491
|
<span class="method-name">power</span><span class="method-args">(x, y, prec, mode = LongDecimal::ROUND_HALF_DOWN)</span>
|
506
492
|
</a>
|
507
493
|
</div>
|
@@ -509,18 +495,18 @@ that exceed the range of Float
|
|
509
495
|
<div class="method-description">
|
510
496
|
<p>
|
511
497
|
calc the power of x with exponent y to the given precision as <a
|
512
|
-
href="
|
513
|
-
|
498
|
+
href="LongDecimal.html">LongDecimal</a>. Only supports values of y such
|
499
|
+
that exp(y) still fits into a float (y <= 709)
|
514
500
|
</p>
|
515
501
|
</div>
|
516
502
|
</div>
|
517
503
|
|
518
|
-
<div id="method-
|
519
|
-
<a name="
|
504
|
+
<div id="method-M000135" class="method-detail">
|
505
|
+
<a name="M000135"></a>
|
520
506
|
|
521
507
|
<div class="method-heading">
|
522
|
-
<a href="LongMath.src/
|
523
|
-
onclick="popupCode('LongMath.src/
|
508
|
+
<a href="LongMath.src/M000135.html" target="Code" class="method-signature"
|
509
|
+
onclick="popupCode('LongMath.src/M000135.html');return false;">
|
524
510
|
<span class="method-name">power_internal</span><span class="method-args">(x, y, prec = nil, final_mode = LongDecimal::ROUND_HALF_DOWN, iprec = nil, mode = LongDecimal::ROUND_HALF_DOWN)</span>
|
525
511
|
</a>
|
526
512
|
</div>
|
@@ -535,12 +521,12 @@ if the default settings for the parameters do not work correctly
|
|
535
521
|
</div>
|
536
522
|
</div>
|
537
523
|
|
538
|
-
<div id="method-
|
539
|
-
<a name="
|
524
|
+
<div id="method-M000118" class="method-detail">
|
525
|
+
<a name="M000118"></a>
|
540
526
|
|
541
527
|
<div class="method-heading">
|
542
|
-
<a href="LongMath.src/
|
543
|
-
onclick="popupCode('LongMath.src/
|
528
|
+
<a href="LongMath.src/M000118.html" target="Code" class="method-signature"
|
529
|
+
onclick="popupCode('LongMath.src/M000118.html');return false;">
|
544
530
|
<span class="method-name">split_to_words</span><span class="method-args">(x, word_len = 32)</span>
|
545
531
|
</a>
|
546
532
|
</div>
|
@@ -549,17 +535,17 @@ if the default settings for the parameters do not work correctly
|
|
549
535
|
<p>
|
550
536
|
split number (Integer) x into parts of word_len bits each such that the
|
551
537
|
concatenation of these parts as bit patterns is x (the opposite of <a
|
552
|
-
href="LongMath.html#
|
538
|
+
href="LongMath.html#M000119">merge_from_words</a>)
|
553
539
|
</p>
|
554
540
|
</div>
|
555
541
|
</div>
|
556
542
|
|
557
|
-
<div id="method-
|
558
|
-
<a name="
|
543
|
+
<div id="method-M000120" class="method-detail">
|
544
|
+
<a name="M000120"></a>
|
559
545
|
|
560
546
|
<div class="method-heading">
|
561
|
-
<a href="LongMath.src/
|
562
|
-
onclick="popupCode('LongMath.src/
|
547
|
+
<a href="LongMath.src/M000120.html" target="Code" class="method-signature"
|
548
|
+
onclick="popupCode('LongMath.src/M000120.html');return false;">
|
563
549
|
<span class="method-name">sqrtb</span><span class="method-args">(x)</span>
|
564
550
|
</a>
|
565
551
|
</div>
|
@@ -572,12 +558,12 @@ result is rounded to an integer y such that y**2
|
|
572
558
|
</div>
|
573
559
|
</div>
|
574
560
|
|
575
|
-
<div id="method-
|
576
|
-
<a name="
|
561
|
+
<div id="method-M000121" class="method-detail">
|
562
|
+
<a name="M000121"></a>
|
577
563
|
|
578
564
|
<div class="method-heading">
|
579
|
-
<a href="LongMath.src/
|
580
|
-
onclick="popupCode('LongMath.src/
|
565
|
+
<a href="LongMath.src/M000121.html" target="Code" class="method-signature"
|
566
|
+
onclick="popupCode('LongMath.src/M000121.html');return false;">
|
581
567
|
<span class="method-name">sqrtb_with_remainder</span><span class="method-args">(x)</span>
|
582
568
|
</a>
|
583
569
|
</div>
|
@@ -594,12 +580,12 @@ result is rounded to an integer y such that y**2
|
|
594
580
|
</div>
|
595
581
|
</div>
|
596
582
|
|
597
|
-
<div id="method-
|
598
|
-
<a name="
|
583
|
+
<div id="method-M000122" class="method-detail">
|
584
|
+
<a name="M000122"></a>
|
599
585
|
|
600
586
|
<div class="method-heading">
|
601
|
-
<a href="LongMath.src/
|
602
|
-
onclick="popupCode('LongMath.src/
|
587
|
+
<a href="LongMath.src/M000122.html" target="Code" class="method-signature"
|
588
|
+
onclick="popupCode('LongMath.src/M000122.html');return false;">
|
603
589
|
<span class="method-name">sqrtw</span><span class="method-args">(x, n = 16)</span>
|
604
590
|
</a>
|
605
591
|
</div>
|
@@ -615,12 +601,12 @@ integer y such that y**2
|
|
615
601
|
</div>
|
616
602
|
</div>
|
617
603
|
|
618
|
-
<div id="method-
|
619
|
-
<a name="
|
604
|
+
<div id="method-M000123" class="method-detail">
|
605
|
+
<a name="M000123"></a>
|
620
606
|
|
621
607
|
<div class="method-heading">
|
622
|
-
<a href="LongMath.src/
|
623
|
-
onclick="popupCode('LongMath.src/
|
608
|
+
<a href="LongMath.src/M000123.html" target="Code" class="method-signature"
|
609
|
+
onclick="popupCode('LongMath.src/M000123.html');return false;">
|
624
610
|
<span class="method-name">sqrtw_with_remainder</span><span class="method-args">(x, n = 16)</span>
|
625
611
|
</a>
|
626
612
|
</div>
|
@@ -641,46 +627,6 @@ integer y such that y**2
|
|
641
627
|
</div>
|
642
628
|
</div>
|
643
629
|
|
644
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
645
|
-
|
646
|
-
<div id="method-M000024" class="method-detail">
|
647
|
-
<a name="M000024"></a>
|
648
|
-
|
649
|
-
<div class="method-heading">
|
650
|
-
<a href="LongMath.src/M000024.html" target="Code" class="method-signature"
|
651
|
-
onclick="popupCode('LongMath.src/M000024.html');return false;">
|
652
|
-
<span class="method-name">LongDecimal</span><span class="method-args">(a, b = 0)</span>
|
653
|
-
</a>
|
654
|
-
</div>
|
655
|
-
|
656
|
-
<div class="method-description">
|
657
|
-
<p>
|
658
|
-
Creates a <a href="LongMath.html#M000024">LongDecimal</a> number.
|
659
|
-
<tt>a</tt> and <tt>b</tt> should be <a
|
660
|
-
href="LongMath/Numeric.html">Numeric</a>.
|
661
|
-
</p>
|
662
|
-
</div>
|
663
|
-
</div>
|
664
|
-
|
665
|
-
<div id="method-M000025" class="method-detail">
|
666
|
-
<a name="M000025"></a>
|
667
|
-
|
668
|
-
<div class="method-heading">
|
669
|
-
<a href="LongMath.src/M000025.html" target="Code" class="method-signature"
|
670
|
-
onclick="popupCode('LongMath.src/M000025.html');return false;">
|
671
|
-
<span class="method-name">LongDecimalQuot</span><span class="method-args">(first, second)</span>
|
672
|
-
</a>
|
673
|
-
</div>
|
674
|
-
|
675
|
-
<div class="method-description">
|
676
|
-
<p>
|
677
|
-
construct a <a href="LongMath.html#M000025">LongDecimalQuot</a> from the
|
678
|
-
given parameters 1st case: both are LongDecimals 2nd case: first is
|
679
|
-
Rational, second is scale
|
680
|
-
</p>
|
681
|
-
</div>
|
682
|
-
</div>
|
683
|
-
|
684
630
|
|
685
631
|
</div>
|
686
632
|
|
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Mon Mar 20 23:13:32 CET 2006
|