Re: How to pretty print (big)numbers?
Re: How to pretty print (big)numbers?
- Subject: Re: How to pretty print (big)numbers?
- From: Roland King <email@hidden>
- Date: Sat, 11 Oct 2014 15:25:37 +0800
> On 11 Oct 2014, at 3:07 pm, Ronald Hofmann <email@hidden> wrote:
>
> Your number is obviously out of scope.
No it isn’t, 1649463153695818612UL is a perfectly valid unsigned 64bit integer, in hex it’s 0xE4E8B3FD95592288
>
> This works:
> UInt64 sum = 1649463153695818612UL;
> NSString *sumString = [ NSNumberFormatter localizedStringFromNumber:@(sum)
> numberStyle:NSNumberFormatterDecimalStyle];
>
> printf("%s",[sumString UTF8String]);
>
yes because that number is too small to trigger the issue which Greg Parker has kindly explained is an ICU .. feature.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden