Le 24 nov. 2011 à 23:46, Conrad Shultz a écrit :

> On 11/24/11 2:27 PM, Jean-Daniel Dupas wrote:
>> Just a question. Why do you need a max frag digit greater than a couple of 
>> tens ? 
> 
> I'm writing a custom formatter that will be used in the context of a
> scientific application and which will take as input a potentially very
> precise decimal.  The formatter will do a number of manipulations but in
> general I don't want to lose precision.

A formatter is used to convert an internal number representation (integer, 
floating point, fixed point) into a string. 
Is has nothing to do with the precision of the represented value.

If you use double to do your math, you will get as much precision as double 
provide, whatever the formatter you use.

> 
> In practice, of course, merely using NSDecimal greatly reduces the
> available precision, so my question is not of the "I need this to work"
> category but rather of the "should I file a bug on this in case someone
> else encounters this behavior and really does need this to work" category.

If you managed to prove that such case may exist, why not, but I really don't 
see how having more than hundred of digits can be useful as there is no 
internal representation able to represent a decimal with such precision.

> (At the very least, I feel that the documentation should note if there
> are restrictions on input beyond what is dictated by data type.)


-- Jean-Daniel




_______________________________________________

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