Returns a formatted string representation of this polynomial using specified numeric format.

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
public string ToString(
	string format
)
Visual Basic (Declaration)
Public Function ToString ( _
	format As String _
) As String
Visual C++
public:
String^ ToString(
	String^ format
)

Parameters

format
Type: System..::.String
Format for coefficients.

Return Value

A formatted string representation of the form an*x^n + ... + a1*x + a0.

Remarks

Degrees of x are listing in descending order.

Examples

Polynomial p = new Polynomial( new DoubleVector( "-5 1 4 0 1 3 3 -1" ) ); Console.WriteLine( p.ToString( "F2" )); // prints "-x^7 + 3.0x^6 + 3.0x^5 + x^4 + 4.0x^2 + x - 5.0"

See Also