initial code on the net,
interested people can take a look there -
http://libcalc.sourceforge.net/
 
Regards,
Justinas V.D.