Click or drag to resize
Accord.NET (logo)

RationalFromDouble Method

Converts a floating-point number to a rational number.

Namespace:  Accord.Math
Assembly:  Accord (in Accord.dll) Version: 3.8.0
public static Rational FromDouble(
	double value,
	double tolerance = 1E-06
Request Example View Source


Type: SystemDouble
A floating-point number to convert to a rational number.
tolerance (Optional)
Type: SystemDouble
The maximum error allowed between the result and the input value.

Return Value

Type: Rational
A rational number.
See Also