java and the precission please HELP me!!!

Discussion in 'Java' started by juavizga, Apr 10, 2004.

  1. juavizga

    juavizga Guest

    I need work wiht 30 decimals in a double, but when I try to store :

    44*279^7+97*279^5+104*279^4+99*279^3+110*279^2+97*279+77

    when a^b is Math.pow(a,b). Exemple 2^2 is 2*2=4

    well if I execute this in the calc of windows I get 5.790211750705701434e18
    -----
    but when I execute in my program whit java the result that I get is:
    5.7902117507057009e18
    ----
    the result is not the same in java the result is rounded and I lose
    precission can anybody or java guru help me, I need the wole precission.


    THANKS
     
    juavizga, Apr 10, 2004
    #1
    1. Advertising

  2. On Sat, 10 Apr 2004 21:35:31 +0200, juavizga wrote:

    > I need work wiht 30 decimals...


    I see your also trying to work with (at least)
    2 news groups.

    Please keep it to c.l.j.help until you discover
    why mutli-posting is so counter-productive.

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, Apr 10, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. queen
    Replies:
    3
    Views:
    6,610
    queen
    Jul 15, 2004
  2. Replies:
    4
    Views:
    529
    Chris Uppal
    May 5, 2005
  3. KK
    Replies:
    2
    Views:
    618
    Big Brian
    Oct 14, 2003
  4. MuZZy
    Replies:
    7
    Views:
    1,779
    Mike Hewson
    Jan 7, 2005
  5. Hans Larsen

    real numbers with infinity precission

    Hans Larsen, Nov 19, 2009, in forum: Python
    Replies:
    1
    Views:
    310
    Steven D'Aprano
    Nov 19, 2009
Loading...

Share This Page