| PolynomialToString(String) Method |
Returns a formatted string representation of this polynomial using
specified numeric format.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public string ToString(
string format
)
Public Function ToString (
format As String
) As String
public:
String^ ToString(
String^ format
)
member ToString :
format : string -> string
Parameters
- format String
- Format for coefficients.
Return Value
String
A formatted string representation of the form
an*x^n + ... + a1*x + a0.
Remarks
Degrees of x are listing in descending order.
Example
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