Re: double precision in x-code
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