On 2007-09-01, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
> In message <[EMAIL PROTECTED]>,
> sturlamolden wrote:
>
>> There are fractions that can be exactly represented by floats that
>> cannot be exactly represented by decimals.
>
> There are no such.
In that statement does "float" mean fin
In message <[EMAIL PROTECTED]>, Wildemar
Wildenburger wrote:
> But what use is there for floats, then? When is it OK to use
> them?
Floating-point numbers are useful when you have to deal with very large and
very small amounts at the same time. In using them, you must understand
something about h
In message <[EMAIL PROTECTED]>,
sturlamolden wrote:
> There are fractions that can be exactly represented by floats that
> cannot be exactly represented by decimals.
There are no such.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 1, 4:58 am, MRAB <[EMAIL PROTECTED]> wrote:
> On Aug 31, 5:39 pm, David H Wild <[EMAIL PROTECTED]> wrote:> In article
> <[EMAIL PROTECTED]>,
> >Chris Mellon <[EMAIL PROTECTED]> wrote:
>
> > > I believe that to the degree that "real" accounting was done in those
> > > currencies it did i
On Sep 1, 4:51 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Fri, 31 Aug 2007 12:06:49 -0400, Steve Holden <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> > That last sentence is patent nonsense, and completely untrue. Many
> > satisfactory financial applications have
In article <[EMAIL PROTECTED]>,
MRAB <[EMAIL PROTECTED]> wrote:
> > When I worked on the British Railways National Payroll system, about
> > 35 years ago, we, in common with many large users, wrote our system to
> > deal with integer amounts of pennies, and converted to pounds,
> > shillings and
MRAB wrote:
> On Aug 31, 5:39 pm, David H Wild <[EMAIL PROTECTED]> wrote:
>> In article <[EMAIL PROTECTED]>,
>>Chris Mellon <[EMAIL PROTECTED]> wrote:
>>
>>> I believe that to the degree that "real" accounting was done in those
>>> currencies it did in fact use non-decimal bases. Just as people
On Aug 31, 5:39 pm, David H Wild <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
>Chris Mellon <[EMAIL PROTECTED]> wrote:
>
> > I believe that to the degree that "real" accounting was done in those
> > currencies it did in fact use non-decimal bases. Just as people don't
> > use de
Chris Mellon wrote:
> On 8/31/07, Steve Holden <[EMAIL PROTECTED]> wrote:
>> sturlamolden wrote:
>>> On 31 Aug, 02:12, Wildemar Wildenburger
>>> <[EMAIL PROTECTED]> wrote:
>>>
I've heard (ok, read) that several times now and I understand the
argument. But what use is there for floats, the
In article <[EMAIL PROTECTED]>,
Chris Mellon <[EMAIL PROTECTED]> wrote:
> I believe that to the degree that "real" accounting was done in those
> currencies it did in fact use non-decimal bases. Just as people don't
> use decimal time values (except us crazy computer folk), you're write
> 1 poun
On Aug 31, 5:28 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> On 8/31/07, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> > sturlamolden wrote:
> > > On 31 Aug, 02:12, Wildemar Wildenburger
> > > <[EMAIL PROTECTED]> wrote:
>
> > >> I've heard (ok, read) that several times now and I understand the
> >
On 8/31/07, Steve Holden <[EMAIL PROTECTED]> wrote:
> sturlamolden wrote:
> > On 31 Aug, 02:12, Wildemar Wildenburger
> > <[EMAIL PROTECTED]> wrote:
> >
> >> I've heard (ok, read) that several times now and I understand the
> >> argument. But what use is there for floats, then? When is it OK to use
sturlamolden wrote:
> On 31 Aug, 02:12, Wildemar Wildenburger
> <[EMAIL PROTECTED]> wrote:
>
>> I've heard (ok, read) that several times now and I understand the
>> argument. But what use is there for floats, then? When is it OK to use them?
>
> There are fractions that can be exactly represented
On 31 Aug, 02:12, Wildemar Wildenburger
<[EMAIL PROTECTED]> wrote:
> I've heard (ok, read) that several times now and I understand the
> argument. But what use is there for floats, then? When is it OK to use them?
There are fractions that can be exactly represented by floats that
cannot be exactl
Ben Finney wrote:
> Wildemar Wildenburger <[EMAIL PROTECTED]> writes:
>
>> But what use is there for floats, then? When is it OK to use them?
>
> When one is willing to sacrifice decimal precision for speed of
> calculation, and doesn't need the numbers to stay precise. E.g. when
> performing mil
Wildemar Wildenburger <[EMAIL PROTECTED]> writes:
> But what use is there for floats, then? When is it OK to use them?
When one is willing to sacrifice decimal precision for speed of
calculation, and doesn't need the numbers to stay precise. E.g. when
performing millions of calculations on real-w
Wildemar Wildenburger wrote:
> Ben Finney wrote:
>> You most likely do *not* want floating-point numbers for currency,
>> since they rely on the operating system's binary floating point
>> support which cannot accurately represent decimal fractions.
>
> I've heard (ok, read) that several times now
Ben Finney wrote:
> You most likely do *not* want floating-point numbers for currency,
> since they rely on the operating system's binary floating point
> support which cannot accurately represent decimal fractions.
>
I've heard (ok, read) that several times now and I understand the
argument. Bu
luca bertini <[EMAIL PROTECTED]> writes:
> i have strings which look like money values (ie 34.45)
> is there a way to convert them into float variables?
You most likely do *not* want floating-point numbers for currency,
since they rely on the operating system's binary floating point
support which
Gary Herron wrote:
luca bertini wrote:
Hi,
i have strings which look like money values (ie 34.45)
is there a way to convert them into float variables?
everytime i try I get this error: "numb = float(my_line) ValueError:
empty string for float()"
"
here's the code
import sys
luca bertini wrote:
> Hi,
>
> i have strings which look like money values (ie 34.45)
> is there a way to convert them into float variables?
> everytime i try I get this error: "numb = float(my_line) ValueError:
> empty string for float()"
> "
> here's the code
>
>
>
> import sys
> im
luca bertini <[EMAIL PROTECTED]> writes:
> i have strings which look like money values (ie 34.45)
> is there a way to convert them into float variables?
> everytime i try I get this error: "numb = float(my_line) ValueError:
> empty string for float()"
> "
You actually have problems here -- the
Hi,
i have strings which look like money values (ie 34.45)
is there a way to convert them into float variables?
everytime i try I get this error: "numb = float(my_line) ValueError:
empty string for float()"
"
here's the code
import sys
import re
for line in sys.stdin.readlines():
23 matches
Mail list logo