[Rd] BUG: polyroot() (PR#751)

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
07 Dec 2000 17:33:22 +0100


Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:

> Peter
> 
> I noticed with the original problem that there was a difference between R 1.1.1
> and the R 1.2  snapshot from a few weeks ago. I would guess you are not running 1.2
> since you get
> 
> >> polyeval(1:5,polyroot(1:5))
> >[1] -2.220446e-16-2.664833e-16i -2.220446e-16-1.554475e-16i
> >[3] -2.220446e-16+1.436839e-16i -2.220446e-16-5.076235e-16i
> 
> and with my snapshot I get
> > polyeval(1:5,polyroot(1:5))
> [1]  3.330669e-16+5.828671e-16i  3.330669e-16+2.220446e-16i
> [3] -2.220446e-16-3.885781e-16i  3.330669e-16-5.828671e-16i
> 
> I expect you probably know more about the change than I do, but though I would warn
> you anyway.

Hm? With the current version, I'm still getting

>  polyeval(1:5,polyroot(1:5))
[1] -2.220446e-16-2.664833e-16i -2.220446e-16-1.554475e-16i
[3] -2.220446e-16+1.436839e-16i -2.220446e-16-5.076235e-16i
>

> version
         _                           
platform i586-pc-linux-gnu           
arch     i586                        
os       linux-gnu                   
system   i586, linux-gnu             
status   Under development (unstable)
major    1                           
minor    2.0                         
year     2000                        
month    12                          
day      07                          
language R                           

However, my 1.1.1 is different:

> polyeval(1:5,polyroot(1:5))
[1] 1.110223e-16-3.669889e-16i 0.000000e+00-6.722053e-16i
[3] 0.000000e+00-5.759824e-16i 6.661338e-16-4.592409e-16i
> polyeval(1:10,polyroot(1:10))
[1] -2.815017e-08-3.472720e-09i -2.815014e-08-3.472730e-09i
[3]  3.468454e+04-3.084396e+04i  5.016033e+04-6.107187e+04i
[5]  2.728165e+04+3.719825e+04i -3.455245e+04-4.233822e+03i
[7] -9.016302e+04+5.754516e+04i -7.508538e+04-7.772126e+04i
[9]  3.560675e+04+6.973712e+04i
> polyeval(1:9,polyroot(1:9))
[1] 1.127987e-13+7.833802e-13i 1.130207e-13+7.832323e-13i
[3] 1.127987e-13+7.838768e-13i 1.117995e-13+7.844319e-13i
[5] 5.270229e-13+8.071365e-13i 2.582379e-13+7.174489e-13i
[7] 1.179057e-13+6.123224e-13i 1.865175e-13+6.731772e-13i


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._