• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to pretty print (big)numbers?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >How to pretty print (big)numbers? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to pretty print (big)numbers? (From: Ronald Hofmann <email@hidden>)

  • Prev by Date: Re: How to pretty print (big)numbers?
  • Next by Date: How to pretty print floating numbers (without loosing precision)?
  • Previous by thread: Re: How to pretty print (big)numbers?
  • Next by thread: Re: How to pretty print (big)numbers?
  • Index(es):
    • Date
    • Thread