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 base pmcs


Okay, so:

1) We round to zero when going from float to int
2) Overflows, underflows, and division by zero throws an exception
3) All-float operations produce floats
4) Addition and subtraction of ints produces an int
5) Multiplication of two ints produces a bignum or an int, depending
on the result
6) Division of two ints produces a bignum
7) Strings are treated as floats for math operations
8) Any operation with a float and an int, string, or bool produces a float
9) Any operation with a bignum produces a bignum
10) The destination PMC is responsible for final conversion of the
inbound value

That seem reasonable?

-- Dan

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to