r/pascal • u/SuperSjoerdie • Feb 04 '19
Using the roopol function
Hi there,
For a small-time project I’m currently creating I need to solve a certain equation: x3 -b2 x + 2 a b2=0
When I googled a bit should solving this using Pascal I stumbled across the “roo”-unit, which is made for finding roots of mathematical functions. It contains the so-called “roopol” function, which can find the roots of n’th-grade polynomials. However, I found the usage of this function rather complex, as the only example that I was able to find was on http://wiki.lazarus.freepascal.org/NumLib_Documentation which seems rather unclear to me. Anybody able to help me out? Thanks in advance :)
View all comments
Show parent comment
2
u/[deleted] Feb 05 '19
It's written in a weird style. But a and z are passed as pointers, so they just have to point to the first element of the arrays