Post Reply 
Solve() gives wrong answer (r10077)
04-27-2016, 01:48 PM
Post: #3
RE: Solve() gives wrong answer (r10077)
The CAS uses base-2 representation for numbers for speed. However, this also means that floating point calculations are seemingly inaccurate for many cases (what you see is not what you get) because there are certain decimal values that cannot be represented exactly using the base-2 representation (as an example: 0.2). I believe this is not an issue with BCD representations. What you see is in fact what you get.

http://www-fourier.ujf-grenoble.fr/~pari...n/#htoc558
https://users.cs.duke.edu/~raw/cps104/TW...ating.html

Converting all non-integer values to their rational form, however, will fix this issue if you insist on using the solve() command. The solve() command attempts to solve equations exactly and will return an empty list if it cannot. Using fsolve() in the case of "approximate" expressions should, however, give the correct (approximate) solution.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Solve() gives wrong answer (r10077) - Han - 04-27-2016 01:48 PM



User(s) browsing this thread: 1 Guest(s)