diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-07-23 07:19:57 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-07-23 07:19:57 +0200 |
commit | 006b114e9ff78391ed4c19c1ece639b72e804e08 (patch) | |
tree | ae41e36564e8c0c38fd374c973fde256b0186551 /numlib/roots.h | |
parent | ba627dd9ecb578e9852c7b9cce67ec63199d1acf (diff) | |
parent | 44e0e31ae94236e3e81567dfd6b919b053d0bbe0 (diff) |
Merge branch 'release/debian/2.0.1-1'HEADdebian/2.0.1+repack-1master
Diffstat (limited to 'numlib/roots.h')
-rwxr-xr-x | numlib/roots.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/numlib/roots.h b/numlib/roots.h new file mode 100755 index 0000000..e14b72d --- /dev/null +++ b/numlib/roots.h @@ -0,0 +1,23 @@ + +/* + * Roots3And4.c + * + * Utility functions to find cubic and quartic roots, + * coefficients are passed like this: + * + * c[0] + c[1]*x + c[2]*x^2 + c[3]*x^3 + c[4]*x^4 = 0 + * + * The functions return the number of non-complex roots and + * put the values into the s array. + * + * Author: Jochen Schwarze (schwarze@isa.de) + * (From Graphics Gems I) + */ + +int SolveQuadric(double c[3], double s[2]); + +int SolveCubic(double c[4], double s[3]); + +int SolveQuartic(double c[5], double s[4]); + + |