struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sachin" <sachin.he...@paradyne.co.in>
Subject RE: Help : execute a equation in String format
Date Tue, 04 Jan 2005 07:13:36 GMT
hi apurva , 

> To be precise you can java.math.BigDecimal and then convert your result
> into string object.

Thanks for ur reply . The equation builder can be achieved this way.
But if the query is complex it takes a long way ... like looking for the 
innermost brackets, aplying square roots , squares , * , / , + , -  etc ..and 
more .

So i was looking for some library class which can take an arithmetic equation 
and deliver its result .. but if this sort of thing is not available  .. then 
i will have to develope it.

Regards,
Sachin Hegde
Software Developer
Paradyne Infotech Limited , Mumbai
09324546711

"The believer is happy. The doubter is wise." -Benjamin Disraeli

---------- Original Message -----------
From: "Apurva Goswami" <agoswami@arnoldtraveltechnology.com>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Tue, 4 Jan 2005 17:28:43 +1100
Subject: RE: Help : execute a equation in String format

> Hi Sachin,
> 
> You can use java.math class to achieve what you want.
> To be precise you can java.math.BigDecimal and then convert your result
> into string object.
> 
> Hope this helps.
> 
> Cheers
> Apurva
> 
> -----Original Message-----
> From: sachin [mailto:sachin.hegde@paradyne.co.in] 
> Sent: Tuesday, January 04, 2005 5:34 PM
> To: Struts Users Mailing List
> Subject: Help : execute a equation in String format
> 
> hi ,
> 
> I have equation in String format
> like
> 
> String equ = "((123*123+567-7899*340)/1234)*1000";
> 
> now i want to execute this equation and get the result ..
> How can i achieve this in java ?
> 
> note : This is not a struts -related issue ... yet i need help so i
> posted ..
> hope nobody minds much ....
> 
> Regards,
> Sachin Hegde
> Software Developer
> Paradyne Infotech Limited , Mumbai
> 09324546711
> 
> "There are three kinds of lies: lies, damn lies, and statistics."
> -Benjamin Disraeli
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
------- End of Original Message -------


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message