Hi,
Java by itself provides a rudimentary Math library. But there are some advanced Math libraries provided by 3rd parties which can be used.
Or if there are existing code./ you can write the code in C, then you can use JNI to call it,.
Hope this helps.
Regards,
Chandra