Reputation: 7764
What's the difference, in C and Objective-C, between using Float64 and long?
Upvotes: 0
Views: 8810
Reputation: 1417
Like mention before one is a integer and one is a float. The basic difference is the ability to have a decimal point, which a real/float can have and integer can not have. If all things were equal a float is stored in science notation, while an integer is not. A float would allow for a much much bigger number and has no need for being unsigned. A double is a long float, and long is long integer so they are larger values. Also in ANSI C there is no Float64.
Upvotes: 1
Reputation: 54030
Long is an integral format, usually on 64bits, but platform-dependant. Float64 is a floating point format, written on 64its (usually double), but guaranteed to be on 64bits.
Upvotes: 1
Reputation: 887807
long
is integral (no decimals); Float64
(or double
) is floating-point.
Upvotes: 6