Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Pow and other functions are missing from Java ME (http://www.chiefdelphi.com/forums/showthread.php?t=127341)

AlexBrinister 01-03-2014 11:17

Pow and other functions are missing from Java ME
 
Hi all,

Recently, I have discovered that the Java ME VM that we are provided with to run robots with has a severely limited math library. In fact, comparing it to the fdlibm math functions available in C, it is quite pathetic. I was looking to change some C code for the function __ieee754_pow into Java code but ran into some issues.

I have found a math utility class written by CodeNameOne, a company that specializes in making it easy to write one program for many mobile platforms. It contains all of the fdlibm math functions which is extremely useful and adds useful functionality to a not-so-useful VM.

You can browse the source here.

Hope this helps somebody!

Alex Brinister

Joe Ross 01-03-2014 13:03

Re: Pow and other functions are missing from Java ME
 
Pow and many other functions are implemented in com.sun.squawk.util.MathUtils.

AlexBrinister 01-03-2014 13:18

Re: Pow and other functions are missing from Java ME
 
Oh hey I didn't catch that in the Squawk library! Thanks!

Alex Brinister


All times are GMT -5. The time now is 11:42.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi