On Mon, Feb 9, 2009 at 2:11 PM, Steve Sisak <[email protected]> wrote:
> At 12:41 PM -0500 2/9/09, Michael Ash wrote:
>>
>>  > A very bad idea as it would force usage of float in 64bits applications
>>>
>>>  where NSSize expect 64 bits CGFloat.
>>
>> So? Float converts to double just fine. There are no bad consequences
>> for passing 11.2f to a function that takes double, aside from an
>> utterly negligible loss of precision when representing the fractional
>> part.
>
> It depends if you care about that precision.
>
> Remember that base 10 is not precisely represented in base 2.

Yes, of course, that would be why I pointed it out.

If you're doing graphics, the precision difference is negligible. This
is borne out by the fact that Cocoa 32-bit does all graphics with
float, not double. If you can't withstand the extremely minor
precision loss of using 11.2f in your 64-bit code, then your 32-bit
code is never going to work in the first place.

Mike
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to