| |
![]() | |
| | #1 (permalink) |
| Pacific Northwest ![]() ![]() Current Rebreather/s: Megalodon Other Rebreather/s: Join Date: Feb 2005 Location: Portland Oregon
Posts: 556
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | VPM's "Radius Root Finder" In Baker's code he uses a search technique"RadiusRootFinder" to solve for the root of a cubic equation with coefficients A, B, C. Is there a reason not to just solve it analytically? Are there conditions that cause the analytic solution to fail? Kinda new to VPM and was just wondering. |
| (Offline) | |
| | #2 (permalink) |
| Michael Prange Current Rebreather/s: Inspiration Vision Other Rebreather/s: Join Date: Mar 2005 Location: Somerville, MA, USA
Posts: 10
![]() | Re: VPM's "Radius Root Finder" Quote: (Originally Posted by UWSojourner) Is there a reason not to just solve it analytically? Are there conditions that cause the analytic solution to fail? I'm not familiar with Baker's code, but I am familiar with numerics issues. Often a root finder is used in lieu of an analytical solution because it is faster (involves fewer floating-point operations). A disadvantage of a root finder is that if you don't choose a good starting guess, you may find the wrong root. I suspect that either Baker's algorithm provides a good starting guess, or two of the roots are always complex, so that a root finder which works only with real numbers has only one root to find. |
| (Offline) | |
| | #3 (permalink) |
| Pacific Northwest ![]() ![]() Current Rebreather/s: Megalodon Other Rebreather/s: Join Date: Feb 2005 Location: Portland Oregon
Posts: 556
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Re: VPM's "Radius Root Finder" Quote: (Originally Posted by Michael Prange) Often a root finder is used in lieu of an analytical solution because it is faster (involves fewer floating-point operations). That very well may be right. I haven't tested the speed difference, but the limited testing I've done his numeric solution converges in about 3 iterations which is pretty fast. |
| (Offline) | |