Thread: Double precision in 64 bit systems
shouldn't double in 64 bit system 128bit (at least when it's on "64-bit" hardware)?
don't know if lack option in compiler (gcc) or what, seems sizeof(int) 4 , sizeof(double) 8. i'd expect in 32 bit age.
sadly when around matter i'm overflown long double , similar stuff. avoid long double type in favor of standard double.
know can shed light on how "64 bit" work when write code in c , compile via gcc (i use blas, llapack , try include cuda code programs, that's why i'd avoid long double).
thanks!
a double in c on x86_64 platform 64 bits on platforms : check out example linux x86_64 abi, page 12. think long double required standard >= double, guess of time it's stored in 128-bits format, use 80 of them, although seems might on platforms use of them, or same double.
think sizes of types in c :
- amd64 or intel64 specification (and checked) doesn't it, since doesn't care programming language (apart assembly)
- c standard(s) requires minimal sizes, doesn't explicitly state actual size of type (it's implementation-defined), apart char, 1 byte-wide.
- x86_64 abi of platform may require specific size types
- (rogue) compilers might break rule
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] Double precision in 64 bit systems
Ubuntu
Comments
Post a Comment