>U.S. stock market with its fractions
I think we'll be needing a special "SmallDecimal" class for that one pretty soon!
;-)
Happy Friday!
Greg
-----Original Message-----
From: U. Penski [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 20, 2002 12:52 PM
To: JDJList
Subject: [jdjlist] Re: Double multiplication
So, a good approach might currently be to realize own functions for the
operations + - * / (...) with a number representation depending
on the specific problem:
1.) U.S. stock market with its fractions :
3 separate variables a,b and c for the fraction 'a_b/c' (in BigDecimal
representation if necessary)
2.) rounding to the penny :
2 separate variables a and b for
a + b/n (a and b as Integer of desired precision ; b marking 1/100 ,
1/10000 , ... of the Pound,Dollar,Euro etc.)
or a+b with a and b as separate 64 Bit floating point representation, each
used for one half of the comma (getting the
already mentioned 128 Bit representation this way).
[Sorry if the discussion begins to leave existing Java standards a bit - at
the end of the week .
Perhaps there is 'a market' for additional mathematical classes within newer
Java(TM) versions ?]
sincerely,
U. Penski
[EMAIL PROTECTED]
( Psion PDA software for fractions @ http://uuhome.de/penski/psoft.htm )
----- Original Message -----
From: "Tomm Carr" <[EMAIL PROTECTED]>
To: "JDJList" <[EMAIL PROTECTED]>
Sent: Friday, September 20, 2002 9:11 PM
Subject: [jdjlist] Re: Double multiplication
...
> Btw, if BigDecimal can be an arbitrary length, what is returned when you
> divide 1 by 3 using BigDecimal? There has to be some point in
> generating the sequence of 9's where even BigDecimal has to call it quits.
...
To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm
To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm