Anonymous user
Generalised floating point multiplication: Difference between revisions
Generalised floating point multiplication (view source)
Revision as of 10:20, 30 October 2011
, 12 years agoconverted list to a table, removed Kudos.
(→[[Generalised_floating_point_multiplication#ALGOL 68]]: add multiplication as a bonus) |
m (converted list to a table, removed Kudos.) |
||
Line 10:
'''Test case:'''
Use the Template to define [[wp:Arbitrary-precision arithmetic|Arbitrary precision multiplication]] on numbers stored in Binary Coded Decimal.
* 111111111e63**2 x 81 + 2e135 - 1e126, Gives: 1e144▼
* 111111111111111111e54**2 x 81 + 2e126 - 1e108, Gives: 1e144▼
* 111111111111111111111111111e45**2 x 81 + 2e117 - 1e90, Gives: 1e144▼
* 111111111111111111111111111111111111e36**2 x 81 + 2e108 - 1e72, Gives: 1e144▼
* The last calculation will be with floating point numbers of more then 500 digits.▼
The results will always be 1e144.▼
{|class="wikitable" style="text-align: center; margin: 1em auto 1em auto;"
Kudos for a Template that successfully handles these multiplications in some other ''interesting'' base.▼
|+ Calculate the terms for -8 to 20 in this sequence of calculations
|-
! Number !! Term calculation !! Result
|-
|-
|-
|-
|-
▲
|}
▲Note: The results will always be 1e144.
▲
=={{header|ALGOL 68}}==
{{works with|ALGOL 68|Revision 1 - one minor extension to language used - PRAGMA READ, similar to C's #include directive.}}
|