neowinston
neowinston

Reputation: 7764

C and Objective-C: What's the difference between using Float64 and long?

What's the difference, in C and Objective-C, between using Float64 and long?

Upvotes: 0

Views: 8810

Answers (4)

Joe Tyman
Joe Tyman

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

Cacho Santa
Cacho Santa

Reputation: 6914

Float64 is a floating point number, and long is integral.

Upvotes: 0

Macmade
Macmade

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

SLaks
SLaks

Reputation: 887807

long is integral (no decimals); Float64 (or double) is floating-point.

Upvotes: 6

Related Questions