|
RationalFromDouble Method
|
Converts a floating-point number to a rational number.
Namespace:
Accord.Math
Assembly:
Accord (in Accord.dll) Version: 3.8.0
Syntax public static Rational FromDouble(
double value,
double tolerance = 1E-06
)
Public Shared Function FromDouble (
value As Double,
Optional tolerance As Double = 1E-06
) As Rational
Request Example
View SourceParameters
- value
- 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:
RationalA rational number.
See Also