Go to Post I have postulated a theory that it is due to a resonance between gravity waves and the color purple. - petek [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-01-2014, 11:17 AM
AlexBrinister AlexBrinister is offline
Registered User
AKA: Alex Brinister
FRC #1768 (RoboChiefs)
Team Role: Alumni
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Bolton, MA
Posts: 93
AlexBrinister will become famous soon enough
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

Last edited by AlexBrinister : 03-01-2014 at 11:25 AM. Reason: Removed example case because I'm not sure anymore...
Reply With Quote
  #2   Spotlight this post!  
Unread 03-01-2014, 01:03 PM
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,547
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Pow and other functions are missing from Java ME

Pow and many other functions are implemented in com.sun.squawk.util.MathUtils.
Reply With Quote
  #3   Spotlight this post!  
Unread 03-01-2014, 01:18 PM
AlexBrinister AlexBrinister is offline
Registered User
AKA: Alex Brinister
FRC #1768 (RoboChiefs)
Team Role: Alumni
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Bolton, MA
Posts: 93
AlexBrinister will become famous soon enough
Re: Pow and other functions are missing from Java ME

Oh hey I didn't catch that in the Squawk library! Thanks!

Alex Brinister
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:02 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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