Don't worry.
We are all happy to show off what we know. Keep the questions coming.
You are not the first or the last person to hit this.
You will have to pay a bit of an extra price on each computation to be
sure that you have "guarded" enough of the precision of the numbers
during calculation so that when you round down to 2 (or however many
digits your currency requires) digits after the decimal, you get the
same answer that a person would get doing it in base10 using integer
arithmetic.
No choice.
Ron
ntasky wrote:
I'm far far away from being a financial expert (never told i was one),
and what i'm developping right now is just for my personnal stuff. It
is how I learn about new stuff. So thx again for your advices
N.
----- Original Message ----- From: "Ron Wheeler"
<[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Saturday, January 27, 2007 9:29 AM
Subject: Re: [Flashcoders] math simple operation
Knowledge of arithmetic would seem to be the sort of thing one would
expect in a financial "expert". :-)
Although to be fair, this does crop up about once a quarter in the
forum as a new person discovers one of the hidden joys of using a
computer that does not have 10 fingers to work with.
Ron
Paul Andrews wrote:
If you're doing a financial application, it's important that you
address
this correctly: fast but giving the wrong answer isn't an option.
I have worked on some systems where the front end gave one figure,
but the
back end reporting function gave another because this wasn't properly
addressed..
As a financial application developer, it's surprising you weren't
already
aware of the inaccuracy of floating point.
----- Original Message ----- From: "ntasky" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Saturday, January 27, 2007 1:40 PM
Subject: Re: [Flashcoders] math simple operation
hi,
well I'm trying to do a financial application, so it's going to be too
heavy
to do additionnal operation
N.
--
Nicolas TASKY
conseil, analyse et développement multimédia
ntasky.com - (514) 839-6426
----- Original Message ----- From: "Hans Wichman"
<[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Saturday, January 27, 2007 8:22 AM
Subject: Re: [Flashcoders] math simple operation
Hi,
multiply everything with 1000 before, and divide by 1000 after?:)
greetz
JC
On 1/27/07, ntasky <[EMAIL PROTECTED]> wrote:
Hi,
I'm kind of disapointed :
trace (1.3-1) // traces:0.3
but :
trace (9.3-9) // traces: 0.300000000000001
trace (100.3-100) //traces: 0.299999999999997
...
is there a way that it can traces always 0.3 has it should be
normal ?
thx
N.
--
Nicolas TASKY
conseil, analyse et développement multimédia
ntasky.com - (514) 839-6426
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com