How does Mathematica know whether a number is real or complex?
- To: mathgroup at smc.vnet.net
- Subject: [mg93016] How does Mathematica know whether a number is real or complex?
- From: Peng Yu <PengYu.UT at gmail.com>
- Date: Fri, 24 Oct 2008 02:27:34 -0400 (EDT)
Hi, The solution of the equation at the end of this post is {{x -> -0.9702291184141268, y -> -0.24218888864137905}, {x -> -0.44830718122625973, y -> 0.8938795619438703}, {x -> 1.3776284630851778 - 0.7866963118457873*I, y -> -0.9763348915886718 - 1.1100445557562666*I}, {x -> 1.3776284630851778 + 0.7866963118457873*I, y -> -0.9763348915886718 + 1.1100445557562666*I}} Two of the solutions are real. The other two are complex. I'm wondering how Mathematica know whether a solution is real or complex. If a solution actually has a close-to-zero imaginary part, will mathematica incorrect consider it as a real number? Thanks, Peng AA = {{0.45236, -0.241371}, {-0.241371, 0.173649}}; BB = {-0.500298, 0.141347}; CC = -0.773749; Solve[{{x, y}.AA.{x, y} + BB.{x, y} + CC == 0, x^2 + y^2 == 1}, {x, y}]