Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | "BartC" <bc@freeuk.com> |
|---|---|
| Newsgroups | comp.misc |
| References | (3 earlier) <53616180$0$59815$c3e8da3$e074e489@news.astraweb.com> <gknav.371282$sa2.196137@fx33.am4> <bsuj7gFd631U1@mid.individual.net> <Xtpav.335997$5V5.276603@fx08.am4> <slrnlmm4e9.ub.greymausg@gmaus.org> |
| Subject | Re: BASIC is 50 |
| Message-ID | <J8Jav.1$z21.0@fx12.am4> (permalink) |
| Organization | virginmedia.com |
| Date | 2014-05-08 11:38 +0100 |
<greymausg@mail.com> wrote in message news:slrnlmm4e9.ub.greymausg@gmaus.org... > On 2014-05-07, BartC <bc@freeuk.com> wrote: >> (In any case, typical 64-bit floating point can represent amounts up to >> nearly $100 trillion, expressed in whole cents.) >> > > [why floating point should not be used in finance] > Those tiny amounts, added together, can be diverted, as in the salami > scam. Python has decimal.Decimal for that sort of thing That might be an *for* using floating point: If you calculate 2.7% interest on $1234.56, then floating point will give you $33.33312. You can see the 0.312 cents left over after rounding to $33.33 and can choose what to do with it. What happens to the 0.312 cents with 'decimal.Decimal'? -- Bartc
Back to comp.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
BASIC is 50 Gordon Henderson <gordon+usenet@drogon.net> - 2014-04-30 09:34 +0000
Re: BASIC is 50 Ant <ant@zimage.comANT> - 2014-04-30 03:42 -0700
Re: BASIC is 50 Bob Eager <news0002@eager.cx> - 2014-04-30 10:46 +0000
Re: BASIC is 50 Gordon Henderson <gordon+usenet@drogon.net> - 2014-04-30 12:03 +0000
Re: BASIC is 50 Rich <rich@example.com> - 2014-04-30 11:12 +0000
Re: BASIC is 50 scott@alfter.diespammersdie.us (Scott Alfter) - 2014-04-30 15:56 +0000
Re: BASIC is 50 Rich <rich@example.com> - 2014-04-30 20:41 +0000
Re: BASIC is 50 Will Honea <whonea@whonea.net> - 2014-04-30 18:38 -0600
Re: BASIC is 50 Rich <rich@example.com> - 2014-05-01 02:38 +0000
Re: BASIC is 50 Will Honea <whonea@whonea.net> - 2014-04-30 22:50 -0600
Re: BASIC is 50 Rich <rich@example.com> - 2014-04-30 20:48 +0000
Re: BASIC is 50 Richard Kettlewell <rjk@greenend.org.uk> - 2014-05-02 09:27 +0100
Re: BASIC is 50 Tim Streater <timstreater@greenbee.net> - 2014-05-02 09:50 +0100
Re: BASIC is 50 "BartC" <bc@freeuk.com> - 2014-05-07 10:48 +0100
Re: BASIC is 50 Tim Streater <timstreater@greenbee.net> - 2014-05-07 10:57 +0100
Re: BASIC is 50 Huge <Huge@nowhere.much.invalid> - 2014-05-07 11:20 +0000
Re: BASIC is 50 "BartC" <bc@freeuk.com> - 2014-05-07 13:14 +0100
Re: BASIC is 50 Marko Rauhamaa <marko@pacujo.net> - 2014-05-07 16:05 +0300
Re: BASIC is 50 Paul Sture <nospam@sture.ch> - 2014-05-08 18:06 +0200
Re: BASIC is 50 Marko Rauhamaa <marko@pacujo.net> - 2014-05-08 20:17 +0300
Re: BASIC is 50 "James Harris" <james.harris.1@gmail.com> - 2014-05-07 16:08 +0100
Re: BASIC is 50 "BartC" <bc@freeuk.com> - 2014-05-07 18:38 +0100
Re: BASIC is 50 "James Harris" <james.harris.1@gmail.com> - 2014-05-07 19:09 +0100
Re: BASIC is 50 Huge <Huge@nowhere.much.invalid> - 2014-05-07 19:08 +0000
Re: BASIC is 50 greymausg@mail.com - 2014-05-08 10:15 +0000
Re: BASIC is 50 "BartC" <bc@freeuk.com> - 2014-05-08 11:38 +0100
Re: BASIC is 50 Paul Sture <nospam@sture.ch> - 2014-05-08 17:55 +0200
Re: BASIC is 50 Paul Sture <nospam@sture.ch> - 2014-05-08 17:44 +0200
Re: BASIC is 50 Rich <rich@example.com> - 2014-05-12 12:39 +0000
Re: BASIC is 50 Marko Rauhamaa <marko@pacujo.net> - 2014-05-12 16:06 +0300
Re: BASIC is 50 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-05-12 22:48 +0100
Re: BASIC is 50 Rich <rich@example.com> - 2014-05-13 12:03 +0000
Re: BASIC is 50 "BartC" <bc@freeuk.com> - 2014-05-13 13:23 +0100
Re: BASIC is 50 Rich <rich@example.com> - 2014-05-13 16:22 +0000
Re: BASIC is 50 "BartC" <bc@freeuk.com> - 2014-05-13 19:42 +0100
Re: BASIC is 50 "BartC" <bc@freeuk.com> - 2014-05-13 19:49 +0100
Re: BASIC is 50 Rich <rich@example.com> - 2014-05-14 01:09 +0000
Re: BASIC is 50 "BartC" <bc@freeuk.com> - 2014-05-14 09:51 +0100
Re: BASIC is 50 bde@besplex.bde.org (Bruce Evans) - 2014-05-14 10:36 +0000
Re: BASIC is 50 "BartC" <bc@freeuk.com> - 2014-05-14 12:58 +0100
Re: BASIC is 50 bde@besplex.bde.org (Bruce Evans) - 2014-05-14 16:13 +0000
Re: BASIC is 50 "BartC" <bc@freeuk.com> - 2014-05-14 19:24 +0100
Re: BASIC is 50 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-05-13 15:50 +0100
Re: BASIC is 50 Johny B Good <johnny-b-good@invalid.ntlworld.com> - 2014-05-01 02:50 +0100
Re: BASIC is 50 David Hume <David.Hume@example.com> - 2014-05-01 09:06 +0100
Re: BASIC is 50 Gordon Henderson <gordon+usenet@drogon.net> - 2014-05-01 09:56 +0000
Re: BASIC is 50 Rich <rich@example.com> - 2014-05-01 10:25 +0000
Re: BASIC is 50 Marko Rauhamaa <marko@pacujo.net> - 2014-05-01 16:43 +0300
Re: BASIC is 50 Gordon Henderson <gordon+usenet@drogon.net> - 2014-05-01 18:03 +0000
Re: BASIC is 50 Bob Eager <news0002@eager.cx> - 2014-05-01 21:35 +0000
Re: BASIC is 50 Rob <monst.oorzudo@ntlworld.com> - 2014-05-01 22:41 +0100
Re: BASIC is 50 David Hume <David.Hume@example.com> - 2014-05-02 09:26 +0100
Re: BASIC is 50 Hils <hils@saynotospam.net> - 2014-05-02 10:46 +0100
Re: BASIC is 50 Johny B Good <johnny-b-good@invalid.ntlworld.com> - 2014-05-02 23:11 +0100
Re: BASIC is 50 Anssi Saari <as@sci.fi> - 2014-04-30 17:51 +0300
Re: BASIC is 50 Peter Percival <peterxpercival@hotmail.com> - 2014-05-14 17:40 +0100
csiph-web