fn toFloat(self: Rational, comptime T: type) !T

Return a floating-point value that is the closest value to a Rational.

The result may not be exact if the Rational is too precise or too large for the target type.

Parameters

self: Rational,
T: type,