File Exchange

image thumbnail

Polynomial roots with Jenkins-Traub algorithm

version (24.3 KB) by Ivo Houtzager
Find polynomial roots with Jenkins-Traub algorithm.


Updated 07 Apr 2021

From GitHub

View Version History

View license on GitHub

Find polynomial roots with Jenkins–Traub algorithm. The mex-function is using the CPOLY algorithm from ACM Algorithm 419 for polynomials with complex coefficients, and the RPOLY algorithm from ACM Algorithm 493 for polynomials with real coefficients. The algorithm calculates all of the zeros of a polynomial whose coefficients are the elements of a vector in order of decreasing powers. Leading zeros in the coefficients are discarded.

Cite As

Ivo Houtzager (2021). Polynomial roots with Jenkins-Traub algorithm (, GitHub. Retrieved .

Comments and Ratings (2)

Ivo Houtzager

Seems that "abs" is double defined when including the VS2013 math.h file. Remove the line 166 from f2c.h or wrap with /**/. This will make the error disappear.


When I try and run make_polyroots.m I get the following error:

Error using mex
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(470) : error C2059: syntax error : '('

Error in make_polyroots (line 55)
eval(['mex ', COMPILE_OPTIONS, ' polyroots.c',' rpoly.c',' pow_di.c']);

Any advice?

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!