• 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: why are floats flakey?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why are floats flakey?


  • Subject: Re: why are floats flakey?
  • From: Chris Ridd <email@hidden>
  • Date: Tue, 25 May 2004 08:58:08 +0100

On 25/5/04 3:58 am, Greg Hulands <email@hidden> wrote:

> You could use NSDecimalNumber

On the other hand Justin could simply use NSString's stringWithFormat: to
produce a string with limited precision, eg

NSString *s = [NSString stringWithFormat: @"%.2f",
[myTextField doubleValue]];

<URL:http://developer.apple.com/documentation/Cocoa/Conceptual/DataFormattin
g/Tasks/FormatStrings.html#//apple_ref/doc/uid/20000943>

Cheers,

Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: simple telnet-like networking in cocoa
  • Next by Date: Re: [ANN] Searchable Cocoa-Dev Web Archive (again)
  • Previous by thread: Re: why are floats flakey?
  • Next by thread: Re: why are floats flakey?
  • Index(es):
    • Date
    • Thread