On Tue, May 24, 2016, at 04:18 PM, Jens Alfke via swift-users wrote:
> For completeness I should add that there are other cases where you need
> to know the exact type:
> 
> * When formatting a floating-point number, you should use 6 decimal
> places if it's a float, 16 if it's a double. (If you use all 15 for a
> float, you end up with results like “0.999999999999999” instead of
> “0.1”.)
> * There’s an edge case in converting an NSNumber to an integer. Most of
> the time you can use longLongValue. But if the number is an unsigned
> 64-bit int (objcType == “Q”) you have to use unsignedLongLongValue,
> otherwise it may overflow and appear negative.

I don't know you think these should be in their own bug or as a part of
https://bugs.swift.org/browse/SR-1610. I will defer to you.

> 
> —Jens
> _______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to