Generalised floating point multiplication: Difference between revisions

m
converted list to a table, removed Kudos.
 
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. Calculate the terms for -8 to 20 in this sequence of calculations:
* 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
|-
*| -8 || 111111111e63**2 x 81 + 2e135 - 1e126, Gives:|| 1e144
|-
*| -7 || 111111111111111111e54**2 x 81 + 2e126 - 1e108, Gives:|| 1e144
|-
*| -6 || 111111111111111111111111111e45**2 x 81 + 2e117 - 1e90, Gives:|| 1e144
|-
*| -5 || 111111111111111111111111111111111111e36**2 x 81 + 2e108 - 1e72, Gives:|| 1e144
|-
*| etc. || The last calculation will be with floating point numbers of more then 500 digits. || 1e144
|}
Note: The results will always be 1e144.
 
Kudos for aThe Template thatshould successfully handleshandle these multiplications in some other ''interesting'' basebases.
=={{header|ALGOL 68}}==
{{works with|ALGOL 68|Revision 1 - one minor extension to language used - PRAGMA READ, similar to C's #include directive.}}