|
RationalFromDecimal 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 FromDecimal(
decimal value,
[OptionalAttribute] decimal tolerance
)
Public Shared Function FromDecimal (
value As Decimal,
<OptionalAttribute> tolerance As Decimal
) As Rational
Request Example
View SourceParameters
- value
- Type: SystemDecimal
A floating-point number to convert to a rational number. - tolerance (Optional)
- Type: SystemDecimal
The maximum error allowed between the result and the input value.
Return Value
Type:
RationalA rational number.
See Also