title: How to format huge NSDecimal to string?
body: <p>Got a big <code>NSDecimal</code> with high precision. Like this:</p>
  
  <pre><code>NSString *decStr = @"999999999999.999999999999";
  NSDecimal dec;
  NSScanner *scanner = [[NSScanner alloc] initWithString:decStr];
  [scanner scanDecimal:&amp;dec];
  
  NSDecimalNumber *decNum = [[NSDecimalNumber alloc] initWithDecimal:*dec];
  </code></pre>
  
  <p>I can easily get a string representation of my <code>NSDecimal</code> with this:</p>
  
  <pre><code>NSString *output = [decNum stringValue];
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>NSString *output = [decNum descriptionWithLocale:nil];
  </code></pre>
  
  <p>But it's never formatted correctly for output on screen:</p>
  
  <pre><code>output = 999999999999.999999999999
  </code></pre>
  
  <p>I want it to have group separation like 999,999,999,999.999999999999</p>
  
  <p>So I tried a <code>NSNumberFormatter</code>:</p>
  
  <pre><code>NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
  [formatter setAllowsFloats:YES];
  [formatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
  [formatter setNumberStyle:kCFNumberFormatterDecimalStyle];
  
  NSString *output = [formatter stringFromNumber:resultDecNum];
  </code></pre>
  
  <p>It ends up with this:</p>
  
  <pre><code>output = 1,000,000,000,000
  </code></pre>
  
  <p>Is there a way to get a big high precision <code>NSDecimal</code> formatted correctly based on users locale without losing precision?</p>