From: SourceForge.net <no...@so...> - 2008-10-18 21:10:51
|
Bugs item #2024777, was opened at 2008-07-22 11:19 Message generated for change (Comment added) made by dgildea You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2024777&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core - Solving equations Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: find_root() gives completely wrong result Initial Comment: I am using Maxima 5.15.0 under Windows. find_root((655/656)^n = 0.5, n, 1, 1000) gives 114.8, which is completely wrong. Fortunately, I checked the answer (always a good habit, I know!). Either of the following expressions give the correct answer, which is 454.4 find_root(float(655/656)^n = 0.5, n, 1, 1000); float(log(0.5)/log(655/656)); Maxima version: 5.15.0 Maxima build date: 17:36 4/20/2008 host type: i686-pc-mingw32 lisp-implementation-type: GNU Common Lisp (GCL) lisp-implementation-version: GCL 2.6.8 email: tow_force at hotmail.com ---------------------------------------------------------------------- >Comment By: Dan Gildea (dgildea) Date: 2008-10-18 17:10 Message: Seems to be specific to GCL. Problem is caused by floating point overflow computing 655^1000.0. (%i7) find_root((655/656)^n = 0.5, n, 1, 1000) ; (%o7) find_root(655^n/656^n = 0.5,n,1.0,1000.0) (%i8) build_info(); Maxima version: 5.15.0 Maxima build date: 10:24 6/17/2008 host type: i386-redhat-linux-gnu lisp-implementation-type: SBCL lisp-implementation-version: 1.0.17 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2024777&group_id=4933 |