Math - Fractions 3/2 to 1 1/2

2010-11-23 Thread paulbeuk
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 --

Re: Math - Fractions 3/2 to 1 1/2

2010-11-23 Thread sebb
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 -

Re: Math - Fractions 3/2 to 1 1/2

2010-11-23 Thread Mikkel Meyer Andersen
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)));

Re: Math - Fractions 3/2 to 1 1/2

2010-11-23 Thread paulbeuk
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 =

[scxml]SCXML Executor Priority?

2010-11-23 Thread Lee, Cheryl - ES
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

Re: [scxml]SCXML Executor Priority?

2010-11-23 Thread Rahul Akolkar
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