Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

64-bit computers & C/C++

  • 23-10-2005 8:34pm
    #1
    Closed Accounts Posts: 223 ✭✭


    Dear all,

    I'm not a mad computer expert now, but I'm thinking of buying a 64-bit machine (AMD) for electronics stuff (GUI building, OpenGL graphics, antenna simulation).

    I'd like to utilise the 64-bit precision. Data type 'double' is a 32-bit number, right? Is there a new data type that is 64-bit precise? Will the OS just recognise the 64 bits automatically?

    If I download the latest version of gcc, will this work with 64 bit precision?

    Could anyone recommend a good linux flavour for 64-bit machines? (It's gonna be my first linux box as I've been using Windows for the last couple of years, so I'd like a nice friendly version that I can delve deep into should I need to).

    Sorry if all the above are googleable in about 2 minutes, it's just there's a lot of stuff out there and I'd really like more direct human perspective.


Comments

  • Registered Users, Registered Users 2 Posts: 2,719 ✭✭✭ARGINITE


    double Double precision real (floating point) numbers. Usually 8 bytes.
    or for integers

    long long I think. just google it:)
    Will the OS just recognise the 64 bits automatically?
    Yes if its a 64bit version of linux.
    Could anyone recommend a good linux flavour for 64-bit machines?
    Try linux.org, they have a good search engine for finding versions of linux.
    so I'd like a nice friendly version
    ubuntu or suse, I dont know many friendly versions of linux and even less 64bit friendly versions.


  • Registered Users, Registered Users 2 Posts: 18,484 ✭✭✭✭Stephen


    Pretty much all linux distribution have 64 bit versions available.


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    AndyWarhol wrote:
    Data type 'double' is a 32-bit number, right?

    Not quite. On a 32bit OS, a double uses 32bits, but on a 64bit machine, it'll use 64bits.

    (The rest is only useful if you intend coding....)That's why it's not safe to use a "double" if you're trying to write portable code. You usually typedef it with a bunch of #ifdef's based on the machine it's being compiled on.

    e.g. (I'm working off rusty memory here, but you'll get the idea)

    #ifdef lin32
    #typedef FLOAT32 double
    #endif
    #ifdef lin64
    #typedef FLOAT32 float
    #endif

    etc.

    Then you'd just delcare FLOAT32's where you wanted 32bit precision, etc.

    The 64bit gcc that comes with your favourite linux distro (I'd recommend suse or ubuntu for 64bit, but probably suse for codebase maturity) will compile 64bit applications very well. It's a relatively mature 64bit compiler by now.

    If you're going with AMD on linux and you're going to be coding then I'd recommend a dual core processor so you can do useful things while your apps compile.

    Good luck.


  • Closed Accounts Posts: 888 ✭✭✭themole


    a float is 32 bits and a double is 64bits.

    hence the name, double stands for double precision as its twice the size as a float. see link:

    http://www.psc.edu/general/software/packages/ieee/ieee.html


Advertisement