On Apr 9, 3:57 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> Naive question: why not just use a long + an exponent?
>
> e.g. 132560 -> (13256, 1)
> 0.534 -> (534, -3)
> 5.23e10 -> (523, 8)
>
It's a good question. The standard answer is that if the
coefficient is a long then it's
On Apr 9, 8:35 pm, Mark Dickinson <[EMAIL PROTECTED]> wrote:
> Strictly speaking, BCD doesn't come into it: the coefficient of a
> Decimal instance is stored simply as a string of digits. This is
> pretty wasteful in terms of space: 1 byte per decimal digit
> instead of the 4 bits per digit that
On Apr 8, 6:01 pm, Jonathan Gardner <[EMAIL PROTECTED]>
wrote:
> On Apr 8, 2:25 pm, Grzegorz S³odkowicz <[EMAIL PROTECTED]> wrote:
>
>
>
> > Isn't Decimal a BCD implementation?
>
> Yep, you are right and I am
> wrong.http://www.python.org/dev/peps/pep-0327/#why-not-rational
Strictly speaking, BCD
On Apr 8, 2:25 pm, Grzegorz Słodkowicz <[EMAIL PROTECTED]> wrote:
>
> Isn't Decimal a BCD implementation?
Yep, you are right and I am wrong.
http://www.python.org/dev/peps/pep-0327/#why-not-rational
--
http://mail.python.org/mailman/listinfo/python-list
> If you want precision with fractions, you should be using the Decimal
> type, which uses a rational. A rational, if you recall from your math
> classes, is one integer divided by another.
>
Isn't Decimal a BCD implementation?
--
http://mail.python.org/mailman/listinfo/python-list
"Matimus" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Apr 8, 9:13 am, "Hutch" <[EMAIL PROTECTED]> wrote:
>> We now have a float result when two integers are divided in the same
>> mannor
>> as 2.4 or 2.5.
>> I can handle that and use the Floor division but a simple question.
On Apr 8, 9:13 am, "Hutch" <[EMAIL PROTECTED]> wrote:
> We now have a float result when two integers are divided in the same mannor
> as 2.4 or 2.5.
> I can handle that and use the Floor division but a simple question.
>
> Why in the world would you round down the last presented digit to a 6
> inst
On Apr 8, 9:13 am, "Hutch" <[EMAIL PROTECTED]> wrote:
> We now have a float result when two integers are divided in the same mannor
> as 2.4 or 2.5.
> I can handle that and use the Floor division but a simple question.
>
> Why in the world would you round down the last presented digit to a 6
> inst
We now have a float result when two integers are divided in the same mannor
as 2.4 or 2.5.
I can handle that and use the Floor division but a simple question.
Why in the world would you round down the last presented digit to a 6
instead of just leaving it along as an 8.
For some reason rounding