
I've just finished working on the type
conversion algorithms so understand the current "atttypmod" field a bit
better, but have not decided how to extend it to multiple fields.

devide it into two 16 bit integers ? 

A mathematical package exists for infinite scale decimals, I think
it was part of a 56 bit RSA cracking effort. It has all thinkable 
operations defined (some I have never heard of, and I am no beginner in math)
I think I wrote to the list about it in the past, but I can't find it anymore. 

Andreas




Tue, 12 May 1998 10:46:05 +0200
Andreas Zeugswetter <andreas.zeugswetter@telecom.at>
AW: [HACKERS] Re: [QUESTIONS] money or dollar type
>> I've just finished working on the type
>> conversion algorithms so understand the current "atttypmod" field a 
>> bit better, but have not decided how to extend it to multiple fields.
> divide it into two 16 bit integers ?

At the moment it already _is_ a 16 bit integer, so it would have to be
divided into two 8 bit integers. Still OK, but then it must be a
positive number, so one field can be only 7 bits. I was thinking of
trying to solve the problem generally so that a type definition can also
define a "type support type" similar to the current atttypmod, but which
could be single or multiple numbers, or a string, or... 

Don't know if it would be generally useful though; still thinking about
how to implement different character sets and collation sequences for
strings and it seems like this might help.

> A mathematical package exists for infinite scale decimals, I think
> it was part of a 56 bit RSA cracking effort. It has all thinkable
> operations defined...

Well, if you find it again let us know ;) In the meantime, the 64-bit
integers are probably the best candidate implementation.

                   - Tom

Tue, 12 May 1998 13:16:04 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: AW: [HACKERS] Re: [QUESTIONS] money or dollar type
> 
> 
> I've just finished working on the type
> conversion algorithms so understand the current "atttypmod" field a bit
> better, but have not decided how to extend it to multiple fields.
> 
> devide it into two 16 bit integers ? 

atttypmod is only 16 bits, so it would be two 8-bit values.  I can
change it to 32-bits if needed.

> 
> A mathematical package exists for infinite scale decimals, I think
> it was part of a 56 bit RSA cracking effort. It has all thinkable 
> operations defined (some I have never heard of, and I am no beginner in math)
> I think I wrote to the list about it in the past, but I can't find it anymore. 

Maybe Marc can find it.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Tue, 12 May 1998 12:59:02 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: AW: [HACKERS] Re: [QUESTIONS] money or dollar type
> 
> >> I've just finished working on the type
> >> conversion algorithms so understand the current "atttypmod" field a 
> >> bit better, but have not decided how to extend it to multiple fields.
> > divide it into two 16 bit integers ?
> 
> At the moment it already _is_ a 16 bit integer, so it would have to be
> divided into two 8 bit integers. Still OK, but then it must be a
> positive number, so one field can be only 7 bits. I was thinking of
> trying to solve the problem generally so that a type definition can also
> define a "type support type" similar to the current atttypmod, but which
> could be single or multiple numbers, or a string, or... 

use unsigned short, that is 8 bits.

> 
> Don't know if it would be generally useful though; still thinking about
> how to implement different character sets and collation sequences for
> strings and it seems like this might help.
> 
> > A mathematical package exists for infinite scale decimals, I think
> > it was part of a 56 bit RSA cracking effort. It has all thinkable
> > operations defined...
> 
> Well, if you find it again let us know ;) In the meantime, the 64-bit
> integers are probably the best candidate implementation.

Yes, the 64-bit idea is good.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Tue, 12 May 1998 13:01:29 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: AW: [HACKERS] Re: [QUESTIONS] money or dollar type