Results 1 to 7 of 7
  1. #1
    Nosrettap is offline Member
    Join Date
    Jan 2011
    Posts
    13
    Rep Power
    0

    Default What is the difference between float and double?

    What is the difference between float and double?

  2. #2
    Vase is offline Member
    Join Date
    Jan 2011
    Location
    Gainesville, FL
    Posts
    45
    Rep Power
    0

    Default

    Same as the difference between an int and a long; longs and doubles have higher precision than ints and floats.

    int = 32 bits
    long = 64 bits
    float = 32 bits
    double = 64 bits

  3. #3
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,798
    Rep Power
    7

    Default

    Google didn't help?

  4. #4
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

  5. #5
    brianmanee is offline Member
    Join Date
    Sep 2014
    Posts
    1
    Rep Power
    0

    Default Re: What is the difference between float and double?

    Quote Originally Posted by Nosrettap View Post
    What is the difference between float and double?
    The Decimal, Double, and Float variable types are different in the way that they store the values. Precision is the main difference where float is a single precision (32 bit) floating point data type, double is a double precision (64 bit) floating point data type and decimal is a 128-bit floating point data type. More about...difference between float and double

    Brian
    Last edited by DarrylBurke; 09-23-2014 at 01:21 PM.

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default Re: What is the difference between float and double?

    Quote Originally Posted by brianmanee View Post
    The Decimal, Double, and Float variable types are different in the way that they store the values. Precision is the main difference where float is a single precision (32 bit) floating point data type, double is a double precision (64 bit) floating point data type and decimal is a 128-bit floating point data type. More about...difference between float and double

    Brian
    Pardon?
    Have they added another primitive when I wasn't looking?
    Last edited by DarrylBurke; 09-23-2014 at 01:21 PM.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: What is the difference between float and double?

    Quote Originally Posted by Tolls View Post
    Pardon?
    Have they added another primitive when I wasn't looking?
    ... between January 2011, when this thread was started, and today?

    Oh, and I'm removing the spammy link just as soon as I post this.

    db

    THREAD CLOSED
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. double or float for importing data?
    By tyang in forum New To Java
    Replies: 2
    Last Post: 02-10-2010, 10:30 AM
  2. double and float value in java
    By arvindmer in forum New To Java
    Replies: 6
    Last Post: 05-28-2009, 05:51 PM
  3. Float vs. Double
    By javanub in forum New To Java
    Replies: 1
    Last Post: 11-23-2008, 01:11 PM
  4. Float and double to binary
    By rosh72851 in forum Advanced Java
    Replies: 3
    Last Post: 09-24-2008, 07:29 AM
  5. Put float value to double
    By chamalsl in forum New To Java
    Replies: 3
    Last Post: 09-20-2008, 05:52 AM

Posting Permissions

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