Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MySQL/unsupported/doc/examples/   (MySQL Server Version 8.1-8.4©)  Datei vom 12.11.2025 mit Größe 635 B image not shown  

Quelle  PolynomialUtils1.cpp   Sprache: C

 
#include <unsupported/Eigen/Polynomials>
#include <iostream>

using namespace Eigen;
using namespace std;

int main()
{
  Vector4d roots = Vector4d::Random();
  cout << "Roots: " << roots.transpose() << endl;
  Eigen::Matrix<double,5,1> polynomial;
  roots_to_monicPolynomial( roots, polynomial );
  cout << "Polynomial: ";
  forint i=0; i<4; ++i ){ cout << polynomial[i] << ".x^" << i << "+ "; }
  cout << polynomial[4] << ".x^4" << endl;
  Vector4d evaluation;
  forint i=0; i<4; ++i ){
    evaluation[i] = poly_eval( polynomial, roots[i] ); }
  cout << "Evaluation of the polynomial at the roots: " << evaluation.transpose();
}

60%


¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.