Message-ID: <0302E5FA-8B66-4858-A9DC-B25D199FC714@gmail.com>
Date: 2012-11-17T12:56:40Z
From: Gonçalo Ferraz
Subject: Can R change my input at higher precision
I just found a problem that may be causing an error in a computation with very small numbers:
I tell R that
thetaP <- 5.531003
and when I ask R to show me thetaP with more precision, it gives me
thetaP
[1] 5.531003000000000114
and even more surprising, if I write
thetaP <- 5.531003000000000000
again, I get:
thetaP
[1] 5.531003000000000114
Is this supposed to happen?
Is there a way to avoid it?
Thank you for any advice.
Gon?alo