why is 'double' the default floating-point primitive

Discussion in 'Java' started by Skippy, Sep 5, 2003.

  1. Skippy

    Skippy Guest

    default java integers are 32 bit (int)
    default java floating-points are 64 bit (double) // 0.0 == 0.0D ... 0.0 !=
    0.0F

    isn't double a real overkill here?
     
    Skippy, Sep 5, 2003
    #1
    1. Advertising

  2. Skippy

    Roedy Green Guest

    On Sat, 6 Sep 2003 00:27:03 +0200, "Skippy" <0spam.nl>
    wrote or quoted :

    >isn't double a real overkill here?


    Consider that the Intel floating point units all work internally on a
    double plus some guard bits. It is actually MORE work to get a float
    in and out the chip that a double. It is not just a matter of
    extending the sign or chopping low order bits.

    Normally you use floats only when you are concerned about space, i.e.
    when you have arrays of them.


    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, Sep 6, 2003
    #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. Sydex
    Replies:
    12
    Views:
    6,508
    Victor Bazarov
    Feb 17, 2005
  2. Replies:
    7
    Views:
    606
    Victor Bazarov
    May 9, 2005
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,005
    Smokey Grindel
    Dec 2, 2006
  4. Daniel Pitts
    Replies:
    7
    Views:
    483
  5. Saraswati lakki
    Replies:
    0
    Views:
    1,350
    Saraswati lakki
    Jan 6, 2012
Loading...

Share This Page