Hello,
Since yesterday I'm using commons-math-2.1.jar to calculate with fractions.
It serves my well. There's one last feature I'd like to use, and can not
find how.
- how do you convert/format fraction 3/2 to 1 1/2
- how do you convert/format fraction 4/2 to 2
Thanks in advance
Paul
--
On 23 November 2010 13:15, paulbeuk paul.van.beuker...@gmail.com wrote:
Hello,
Since yesterday I'm using commons-math-2.1.jar to calculate with fractions.
It serves my well. There's one last feature I'd like to use, and can not
find how.
- how do you convert/format fraction 3/2 to 1 1/2
-
Try to look at FractionFormat.getProperInstance(). Example:
System.out.println(FractionFormat.getProperInstance().format(new
Fraction(5, 2)));
System.out.println(FractionFormat.getImproperInstance().format(new
Fraction(5, 2)));
Hello Mikkel,
Thanks! (great for recipes)
FractionFormat format = FractionFormat.getProperInstance();
Fraction f = new Fraction(5,2);
String s = format.format(f).replaceAll( / , /);
s = s.replaceAll( 0/1, );
System.out.println(s : + s ); = 2 1/2
Fraction f = new Fraction(2,2);
String s =
Hi,
I'm still a bit new to SCXML, and I have a single java SCXMLExecutor running on
Fedora 11 on a large state machine (about 5000 states). I am at the point of
tuning my system, and I was hoping to be able to increase the priority of the
SCXMLExecutor. Is there a way to increase the thread
On Tue, Nov 23, 2010 at 4:47 PM, Lee, Cheryl - ES cheryl@itt.com wrote:
Hi,
I'm still a bit new to SCXML, and I have a single java SCXMLExecutor running
on Fedora 11 on a large state machine (about 5000 states). I am at the
point of tuning my system, and I was hoping to be able to