• 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: double precision in x-code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: double precision in x-code


  • Subject: Re: double precision in x-code
  • From: email@hidden (Christian Demmer)
  • Date: Sun, 26 Sep 2010 13:15:28 +0200

Juan Vesa wrote:
>when i inspect the values of double variables in the x-code debugger
>i note they are not precise, for example i might set a variable
>double tmp = 0.3, and in the debugegr inspector i will see the value
>0.29999999999999993. i'm afraid this error may be accumulating and
>not making some calculations as precise as possible. is this
>standard?

Yes.

> is the actual value in memory 0.3 or is the debugger
>window just showing something wonky?
>any advice would be greatly appreciated,
>cheers,

Floating point  representation is not exact. I suggest reading for
example
<http://floating-point-gui.de/>
for introduction and
<http://docs.sun.com/source/806-3568/ncg_goldberg.html>
if you want (much) more details.

Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >double precision in x-code (From: Juan Vesa <email@hidden>)

  • Prev by Date: Re: Xcode 3.2.4 killed my documentation bookmarks
  • Next by Date: Re: Xcode 3.2.4 killed my documentation bookmarks
  • Previous by thread: Re: double precision in x-code
  • Next by thread: inspecting variable size arrays in debugger
  • Index(es):
    • Date
    • Thread