|
From: | marco atzeri |
Subject: | Re: Possible loss of accuracy |
Date: | Thu, 16 May 2013 07:06:14 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 |
Il 5/16/2013 1:07 AM, Stephen Montgomery-Smith ha scritto:
OK guys, look at this. exp(2^50 * log(1-2^-50)) ans = 3.6787944117144216749e-01 (1-2^-50)^(2^50) ans = 3.6787944112862880353e-01 So the problem is with the pow function, not the log or the exp.
as such is a problem in the libc providing the pow function implementation on cygwin octave 3.6.4, I have: octave:1> format long e octave:2> exp(2^50*log(1-2^-50)) ans = 3.67879441171442e-01 octave:3> (1-2^-50)^(2^50) ans = 3.67879441171442e-01 octave:4> (1-2^-50)^(2^50)-exp(2^50*log(1-2^-50)) ans = 0.00000000000000e+00 regards Marco
[Prev in Thread] | Current Thread | [Next in Thread] |