Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #19050
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2012-10-02 13:00 -0700 |
| References | (2 earlier) <506a2ae0$0$289$14726298@news.sunsite.dk> <c35fa2d6-d47e-4686-bec7-cf8865de1497@googlegroups.com> <1w8fpsrdmn1y2.1nnw9tz9r53rr$.dlg@40tude.net> <93feb84f-7da7-4ef2-9ffc-fcd3666d0485@googlegroups.com> <16ab1j141d7fj$.f7a6n0uuyczq.dlg@40tude.net> |
| Message-ID | <342c6978-d516-41eb-88ba-df3a78a2d175@googlegroups.com> (permalink) |
| Subject | Re: Regarding banking software |
| From | bob smith <bob@coolfone.comze.com> |
On Tuesday, October 2, 2012 2:05:00 PM UTC-5, Peter Duniho wrote: > On Tue, 2 Oct 2012 11:59:01 -0700 (PDT), bob smith wrote: > > > > > On Tuesday, October 2, 2012 11:20:03 AM UTC-5, Peter Duniho wrote: > > >> On Tue, 2 Oct 2012 07:18:51 -0700 (PDT), bob smith wrote: > > >> > > >> > > >> > > >>> [...] > > >> > > >>>> Better just avoid float and double completely when dealing with money! > > >> > > >>> And how will you be calculating interest ? > > >> > > >> With a proper decimal numeric format. E.g. BigDecimal. These exist > > >> > > >> precisely because of this specific issue. > > > > > > Don't you need to be able to raise to a floating point power for interest? (i.e. not an integer) > > > > For example? > > > > All my banks simply compute simple interest periodically, compounding as > > necessary. It's straight multiplication, no exponents necessary. > > > > When is a "floating point power" needed? And if it's needed, what is to > > preclude one from writing a proper decimal implementation rather than > > improperly using float or double for financial computations? If you are just compounding daily, then maybe you don't need it. However, it you want to compound continuously, I think you will need it. ( To use P*e^(r*t) ) And, good luck representing e with your BigDecimal class.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Regarding banking software Navnath Gadakh <navnathgadakh@gmail.com> - 2012-09-30 21:25 -0700
Re: Regarding banking software Roedy Green <see_website@mindprod.com.invalid> - 2012-10-01 10:26 -0700
Re: Regarding banking software Arne Vajhøj <arne@vajhoej.dk> - 2012-10-01 19:43 -0400
Re: Regarding banking software bob smith <bob@coolfone.comze.com> - 2012-10-01 13:10 -0700
Re: Regarding banking software Lew <lewbloch@gmail.com> - 2012-10-01 13:59 -0700
Re: Regarding banking software Arne Vajhøj <arne@vajhoej.dk> - 2012-10-01 19:46 -0400
Re: Regarding banking software Arne Vajhøj <arne@vajhoej.dk> - 2012-10-01 19:44 -0400
Re: Regarding banking software bob smith <bob@coolfone.comze.com> - 2012-10-02 07:18 -0700
Re: Regarding banking software Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-10-02 09:19 -0700
Re: Regarding banking software bob smith <bob@coolfone.comze.com> - 2012-10-02 11:59 -0700
Re: Regarding banking software Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-10-02 12:04 -0700
Re: Regarding banking software bob smith <bob@coolfone.comze.com> - 2012-10-02 13:00 -0700
Re: Regarding banking software Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-10-02 13:34 -0700
Re: Regarding banking software bob smith <bob@coolfone.comze.com> - 2012-10-02 14:22 -0700
Re: Regarding banking software Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-10-02 14:40 -0700
Re: Regarding banking software glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-10-02 22:44 +0000
Re: Regarding banking software Lew <lewbloch@gmail.com> - 2012-10-02 15:52 -0700
Re: Regarding banking software Gene Wirchenko <genew@ocis.net> - 2012-10-02 14:55 -0700
Re: Regarding banking software David Lamb <dalamb@cs.queensu.ca> - 2012-10-02 21:48 -0400
Re: Regarding banking software Arne Vajhøj <arne@vajhoej.dk> - 2012-10-01 19:40 -0400
Re: Regarding banking software David Lamb <dalamb@cs.queensu.ca> - 2012-10-01 22:41 -0400
Re: Regarding banking software Jeff Higgins <jeff@invalid.invalid> - 2012-10-02 03:25 -0400
csiph-web