Big Float.From Rational Method
Constructs a new arbitrary precision floating-point number from a rational number.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.10.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.10.0
public static BigFloat FromRational(
BigInteger numerator,
BigInteger denominator,
AccuracyGoal accuracyGoal,
RoundingMode roundingMode
)Parameters
- numerator BigInteger
- The numerator of the rational number.
- denominator BigInteger
- The denominator of the rational number.
- accuracyGoal AccuracyGoal
- The desired AccuracyGoal for the floating-point number.
- roundingMode RoundingMode
- A RoundingMode value that specifies how the result should be rounded.
Return Value
BigFloatRemarks
The exact fraction is rounded once to the relative significand precision or
absolute binary grid specified by accuracyGoal.
Exceptions
| Not | The required integer shift or binary exponent extent cannot be represented. |