×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    25

    Math operations midp2.0

    Hola! There is anyway to get more math operation in midp2.0 ?(using optional packeges per example)
    The only availables ar abs, min and max and I NEED to do
    x= log(a+b)
    Thanks
    Violeta

  2. #2
    Registered User
    Join Date
    Mar 2005
    Posts
    34
    What exactly will you be using the log function for? Sometimes you can make a simpler version if you already know what values you're going to get out (more or less) or some extra information about your data.

    Åge Kruger

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    25
    well, I have to do teh log operation : log(a + b) where a and b are variables that tehuser entry , so I dont know previosly waht values woudl be. I can guess a range and built a table with teh values but I dont want to do that coz teh table woudl be quite big and my application is already too big. As well, I will lose precisionn in that way coz Is not posible to calcalate 1000 values in one ragen per example , I mean not to keep that values ia mobile. I wonder if is popsible to import some methods from teh j2se or ...... dont know, I really need to do that operation
    Thanks

  4. #4
    Registered User
    Join Date
    Mar 2005
    Posts
    34
    I probably should have been more specific, so i'll be that now: What exactly will you be using the log function to do? What does the information that goes into the equation represent, and what does the number that comes out represent?

    I'm not sure if it would cover it, but J2MEPolish is a product name that's been thrown about quite a bit, but i think it may be outside the scope of the proogram.

    The thing with calculating logs is that it takes a lot of processing power. It does lots of very similar calculations again and again until it finds the answer. But can a mobile telephone handle this? It seems that Sun has decided no it can't. Otherwise, there would be a log function in Math.

    I think you have two options here:
    1. Make a simpler equation that is an approximate to the log (try looking at the "Baby-step, Giant-step", "Pollard Rho", and "Pohlig-Hellman" algorithms; there might even be something simpler if you tell us what it is you're trying to do)
    2. A hash table

    Åge Kruger

  5. #5
    Regular Contributor
    Join Date
    Mar 2005
    Posts
    249
    try this. MathFP package.

    http://www.jscience.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×