COMP.ARCH---------------- < Пред. | След. > -- < @ > -- < Сообщ. > -- < Эхи > --
 Nп/п : 9 из 100
 От   : John Levine                         2:5075/128        23 сен 23 20:53:05
 К    : Terje Mathisen                                        23 сен 23 23:56:02
 Тема : Re: data sizes, Solving the Floating-Point Conundrum
----------------------------------------------------------------------------------
                                                                                 
@MSGID: 1@gal.iecc.com> 73c472cb
@REPLY: 1@dont-email.me> 9753ab8a
@REPLYADDR John Levine <johnl@taugh.com>
@REPLYTO 2:5075/128 John Levine
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID: 1@gal.iecc.com>
@RFC-References:
<57c5e077-ac71-486c-8afa-edd6802cf6b1n@googlegroups.com> <000949fe-1639-41b3-ae9e-764cdf6c9b4bn@googlegroups.com>
1@gal.iecc.com> 1@dont-email.me>
@TZUTC: -0000
@TID: FIDOGATE-5.12-ge4e8b94
According to Terje Mathisen  <terje.mathisen@tmsw.no>:
>> But on z/Series they do indeed have packed decimal vector instructions
>> using the 128 bit vector registers as 31 digits and a sign. There is
>
>So really nybble math?

No, packed decimal. They`re fixed length 31 digit signeddecimal
numbers (the sign is in the 32nd nibble.) Most instructions can
specify the maximum number of significant digits allowed in the
result, and can force positive or negative signs on the result.
There`s a multiply and then shift result right, shift dividend left
and divide, and shift and round, again with significant digit limits.
If the result has too many digits, it`s either reported with a
condition code or an overflow interrupt. See chapter 25 of the zSeries
POO.

You could do all this with 128 bit integers but the significance
checks and decimal rounding would take a lot of extra instructions.

These are for financial stuff like bond pricing that have to match
formulae invented in the era of mechanical desk calculators. Forty
years ago, I managed to do bond prices and yields using 8087
arithmetic but it would have been a lot easier in decimal since then I
could have directly implemented the spec. I wouldn`t have wanted to
try to code up calculations that chained them together.


-- 
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly
--- trn 4.0-test77 (Sep 1, 2010)
 * Origin: Taughannock Networks (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх