On Thu, 26 Aug 2004 11:10:59 -0400, Dan Sugalski <[EMAIL PROTECTED]> wrote:
> At 10:56 AM -0400 8/26/04, John Siracusa wrote:
> >Why make a stop in 32-bit land at all in that case? If the system supports
> >64-bit ints, why not use them for everything right up until you promote to
> >BigNum? Is
At 10:56 AM -0400 8/26/04, John Siracusa wrote:
On Wed, 25 Aug 2004 07:48:03 +0200, Leopold Toetsch <[EMAIL PROTECTED]> wrote:
John Siracusa <[EMAIL PROTECTED]> wrote:
> On Tue, 24 Aug 2004 14:46:53 -0400, Dan Sugalski <[EMAIL PROTECTED]> wrote:
>> The big question is whether being clever and pr
On Wed, 25 Aug 2004 07:48:03 +0200, Leopold Toetsch <[EMAIL PROTECTED]> wrote:
> John Siracusa <[EMAIL PROTECTED]> wrote:
> > On Tue, 24 Aug 2004 14:46:53 -0400, Dan Sugalski <[EMAIL PROTECTED]> wrote:
> >> The big question is whether being clever and producing the tightest
> >> type is worth the t
BigNum is an arbitrary precision decimal number (Think BCD -- Binary Coded
Decimal ala the Unix utility BC)
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 9:12 AM
To: [EMAIL PROTECTED]
Subject: RE: Numeric semantics for base pmcs
On
At 8:11 AM -0500 8/25/04, [EMAIL PROTECTED] wrote:
On Wed, 25 Aug 2004 08:40:32 -0400, "Gay, Jerry" <[EMAIL PROTECTED]> said:
Leopold Toetsch <[EMAIL PROTECTED]> wrote:
> BigNums grow on demand. It depends on value and precision.
>
can BigNum then start at sizeof(int)? overflow would auto-grow
On Wed, 25 Aug 2004 08:40:32 -0400, "Gay, Jerry" <[EMAIL PROTECTED]> said:
> Leopold Toetsch <[EMAIL PROTECTED]> wrote:
> > BigNums grow on demand. It depends on value and precision.
> >
>
> can BigNum then start at sizeof(int)? overflow would auto-grow the BigNum
> to
> the appropriate size, and
Leopold Toetsch <[EMAIL PROTECTED]> wrote:
> BigNums grow on demand. It depends on value and precision.
>
can BigNum then start at sizeof(int)? overflow would auto-grow the BigNum to
the appropriate size, and most integer math operations will keep space usage
as low as possible.
in fact, then i
Leopold Toetsch <[EMAIL PROTECTED]> writes:
> Dan Sugalski <[EMAIL PROTECTED]> wrote:
>> At 8:45 PM +0200 8/24/04, Leopold Toetsch wrote:
>>>Dan Sugalski <[EMAIL PROTECTED]> wrote:
>
Nope -- we don't have bigints. :)
>>>
>>>Pardon, sir?
>
>> We've got the big number code, but I don't see muc
Dan Sugalski <[EMAIL PROTECTED]> wrote:
> At 8:45 PM +0200 8/24/04, Leopold Toetsch wrote:
>>Dan Sugalski <[EMAIL PROTECTED]> wrote:
>>> Nope -- we don't have bigints. :)
>>
>>Pardon, sir?
> We've got the big number code, but I don't see much reason to
> distinguish between integers and non-inte
John Siracusa <[EMAIL PROTECTED]> wrote:
> On Tue, 24 Aug 2004 14:46:53 -0400, Dan Sugalski <[EMAIL PROTECTED]> wrote:
>> The big question is whether being clever and producing the tightest
>> type is worth the time to figure out what that type is, as well as
>> the potentially uncertain output typ
Felix Gallo <[EMAIL PROTECTED]> wrote:
> Dan, any feeling about RISC vs. CISC? Because to me, this seems
> like a good place to punt, and provide two, maybe three mults:
Not the best idea. The same argument would hold for all operations that
could overflow. With such a strategy will end with MMD
At Tue, 24 Aug 2004 15:19:52 -0400,
Dan Sugalski wrote:
>
> At 11:47 AM -0700 8/24/04, Sean O'Rourke wrote:
> >At Tue, 24 Aug 2004 13:33:45 -0400,
> >Dan Sugalski wrote:
> >> 7) Strings are treated as floats for math operations
> >
> >I think we can do better than this by first converting a strin
Nick writes:
> 2 * 3 give a bignum. That feels evil.
> Except that the way that $a = 2 * 3 will work is that the assignment of
> the bignum temporary to $a will cause $a to drop it back to an int
> (for most languages' choice of target PMC) ?
Dan, any feeling about RISC vs. CISC? Because to me, t
On Tue, Aug 24, 2004 at 03:08:21PM -0400, Dan Sugalski wrote:
> At 8:56 PM +0200 8/24/04, Leopold Toetsch wrote:
> >Dan Sugalski <[EMAIL PROTECTED]> wrote:
> >> 5) Multiplication of two ints produces a bignum or an int, depending
> >> on the result
> >
> >Why that difference?
>
> At this point I'
At 11:47 AM -0700 8/24/04, Sean O'Rourke wrote:
At Tue, 24 Aug 2004 13:33:45 -0400,
Dan Sugalski wrote:
6) Division of two ints produces a bignum
Where "bignum" means both "bigger than 32-bit integer" and "rational
number"? So
Yes.
4 / 2 ==> Bignum("2/1")
which doesn't get automatically downg
At 8:56 PM +0200 8/24/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
Okay, so:
4) Addition and subtraction of ints produces an int
???
Yeah, that was wrong. Later fixed. :)
5) Multiplication of two ints produces a bignum or an int, depending
on the result
Why that differen
At 8:45 PM +0200 8/24/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
At 1:42 PM -0400 8/24/04, Butler, Gerald wrote:
Shouldn't 4 also have potential to produce BigInt?
Nope -- we don't have bigints. :)
Pardon, sir?
We've got the big number code, but I don't see much reason to
Dan Sugalski <[EMAIL PROTECTED]> wrote:
> Okay, so:
> 4) Addition and subtraction of ints produces an int
???
> 5) Multiplication of two ints produces a bignum or an int, depending
> on the result
Why that difference?
Int Int gives Bigint or Int (whatever fits)
for in (abs, neg, add, sub
Dan Sugalski <[EMAIL PROTECTED]> wrote:
> At 1:42 PM -0400 8/24/04, Butler, Gerald wrote:
>>Shouldn't 4 also have potential to produce BigInt?
> Nope -- we don't have bigints. :)
Pardon, sir?
leo
At Tue, 24 Aug 2004 13:33:45 -0400,
Dan Sugalski wrote:
> 6) Division of two ints produces a bignum
Where "bignum" means both "bigger than 32-bit integer" and "rational
number"? So
4 / 2 ==> Bignum("2/1")
which doesn't get automatically downgraded to a normal int. Ok.
> 7) Strings are tre
On Tue, 24 Aug 2004 14:46:53 -0400, Dan Sugalski <[EMAIL PROTECTED]> wrote:
> The big question is whether being clever and producing the tightest
> type is worth the time to figure out what that type is, as well as
> the potentially uncertain output type.
Tangentially related: will promotion be su
At 1:39 PM -0400 8/24/04, Simon Glover wrote:
On Tue, 24 Aug 2004, Dan Sugalski wrote:>
6) Division of two ints produces a bignum
Surely it should only produce a bignum as a last resort. For instance,
shouldn't:
4 / 3
produce a float?
A float or a bignum, both are reasonable. There's that who
At 2:08 PM -0400 8/24/04, Matt Fowles wrote:
> >From: Dan Sugalski [mailto:[EMAIL PROTECTED]
> >10) The destination PMC is responsible for final conversion of the
>inbound value
>
I know there has been a lot of grumbling in the past about the need to
create PMCs to be the LHS of operations. I
Oops. I meant BigNum.
-Original Message-
From: Dan Sugalski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 1:47 PM
To: Butler, Gerald; '[EMAIL PROTECTED]'
Subject: RE: Numeric semantics for base pmcs
At 1:42 PM -0400 8/24/04, Butler, Gerald wrote:
>Shouldn&
Shouldn't 4 also have potential to produce BigInt?
-Original Message-
From: Dan Sugalski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 1:34 PM
To: [EMAIL PROTECTED]
Subject: Numeric semantics for base pmcs
Okay, so:
1) We round to zero when going from float to int
2) Overfl
Dan~
> >-Original Message-
> >From: Dan Sugalski [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, August 24, 2004 1:34 PM
> >To: [EMAIL PROTECTED]
> >Subject: Numeric semantics for base pmcs
> >
> >10) The destination PMC is responsible for final conversion of the
> >inbound value
> >
I know
At 1:42 PM -0400 8/24/04, Butler, Gerald wrote:
Shouldn't 4 also have potential to produce BigInt?
Nope -- we don't have bigints. :)
-Original Message-
From: Dan Sugalski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 1:34 PM
To: [EMAIL PROTECTED]
Subject: Numeric semantics for ba
On Tue, 24 Aug 2004, Dan Sugalski wrote:>
>
> 6) Division of two ints produces a bignum
Surely it should only produce a bignum as a last resort. For instance,
shouldn't:
4 / 3
produce a float?
Also, what about a case like:
4 / 2
Does that produce an int, a float or a bignum?
> 9) An
28 matches
Mail list logo