|
From: Richard F. <fa...@be...> - 2017-07-18 20:52:31
|
in general those nested roots are ambiguous because there are 2 sqrts. The fact that float() gets the "right" result is partly concidence. On the other hand, it is a useful (if theoretically dubious) technique to evaluate expressions to floating-point numbers to see if they are the same, just as originally posted. RJF On 7/18/2017 12:55 PM, Roland Salz wrote: >> -----Original Message----- >> From: Raymond Toy [mailto:toy...@gm...] >> >> Here is one way. Take Barton's result: >> >> c: (sqrt(sqrt(5)+5)*(3*sqrt(2)*sqrt(5)-5*sqrt(2))*%i)/20 >> c^2; >> ratsimp(sqrt(expand(%))),algebraic; >> >> => sqrt(5-2*sqrt(5))*%i/sqrt(5) >> >> The c^2 and expand is a hack to get maxima to multiply the contents of the sqrt together. This really only works >> because the imagpart is positive. Otherwise, we probably would have gotten the wrong sign. >> > Great! There seems to be a magic word for everything in Maxima. Thanks a lot to both of you! > > Roland > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss |