<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://spindynamics.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Cubic_roots.m</id>
	<title>Cubic roots.m - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://spindynamics.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Cubic_roots.m"/>
	<link rel="alternate" type="text/html" href="https://spindynamics.org/wiki/index.php?title=Cubic_roots.m&amp;action=history"/>
	<updated>2026-10-02T00:11:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.15</generator>
	<entry>
		<id>https://spindynamics.org/wiki/index.php?title=Cubic_roots.m&amp;diff=10175&amp;oldid=prev</id>
		<title>Kuprov: version fragment to 2.13 per IK 2026-08-30</title>
		<link rel="alternate" type="text/html" href="https://spindynamics.org/wiki/index.php?title=Cubic_roots.m&amp;diff=10175&amp;oldid=prev"/>
		<updated>2026-08-30T09:10:35Z</updated>

		<summary type="html">&lt;p&gt;version fragment to 2.13 per IK 2026-08-30&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 09:10, 30 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot; &gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[eigenfields.m]], [[rootmatch.m]], [[voitlander.m]], [[Kernel utilities]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[eigenfields.m]], [[rootmatch.m]], [[voitlander.m]], [[Kernel utilities]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;''Version 2.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;11&lt;/del&gt;, authors: [[Ilya Kuprov]]''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;''Version 2.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;13&lt;/ins&gt;, authors: [[Ilya Kuprov]]''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kuprov</name></author>
		
	</entry>
	<entry>
		<id>https://spindynamics.org/wiki/index.php?title=Cubic_roots.m&amp;diff=10066&amp;oldid=prev</id>
		<title>Kuprov: sync with Spinach main f053e432: new page for the cubic polynomial real root filter</title>
		<link rel="alternate" type="text/html" href="https://spindynamics.org/wiki/index.php?title=Cubic_roots.m&amp;diff=10066&amp;oldid=prev"/>
		<updated>2026-08-30T07:49:47Z</updated>

		<summary type="html">&lt;p&gt;sync with Spinach main f053e432: new page for the cubic polynomial real root filter&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE:cubic_roots.m}} __NOTOC__&lt;br /&gt;
Real roots of a cubic polynomial in the unit interval. The coefficient vector is first scaled by its largest absolute element, so that root_tol acts as a relative tolerance; an all-zero coefficient vector returns an empty answer. Leading coefficients smaller than root_tol are dropped, which degrades the cubic to a quadratic or a linear problem when the leading coefficients are numerically zero. The roots of the reduced polynomial are obtained with the Matlab roots function, those with an imaginary part below root_tol are taken as real, the ones outside [-root_tol,1+root_tol] are discarded, the survivors are clamped into [0,1] and sorted, and roots closer to each other than root_tol are merged into one.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
     root_list=cubic_roots(poly_coeffs,root_tol)&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
     poly_coeffs - four real coefficients [a b c d] of&lt;br /&gt;
                   a*x^3+b*x^2+c*x+d&lt;br /&gt;
 &lt;br /&gt;
        root_tol - positive real root filtering tolerance&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
     root_list   - sorted row vector of real roots in [0,1]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
A compiled MEX implementation of the same function ships in kernel/eigenfields as cubic_roots.mexa64 and cubic_roots.mexw64, built from cubic_roots.cpp. Matlab gives a MEX file precedence over an .m file of the same name in the same directory, so the Matlab source above is the reference implementation rather than the one that normally executes.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[eigenfields.m]], [[rootmatch.m]], [[voitlander.m]], [[Kernel utilities]]&lt;br /&gt;
&lt;br /&gt;
''Version 2.11, authors: [[Ilya Kuprov]]''&lt;/div&gt;</summary>
		<author><name>Kuprov</name></author>
		
	</entry>
</feed>