Sage Modeling and Simulation Library

Rationalizer Class

This class returns the "correct" representation of a number from a set of fractions, identified by the first N digits in the mantissa. So, if this class is instantiated with fractions up to ninths (halves to ninths), and five digits, 5.333382 will return 5.333382, but 5.3333382 will return 5.333333333333333. 5.999996 will return 6.0, and 7.000001 will return 7.0. This is useful for performing corrections when values are arrived at through computation where it is possible that the value could be a low-order rational number such as 5 1/3, or 6, but the computation results in 5.3333391 or 6.000000215, or 5.99999938.

Namespace:  Highpoint.Sage.Mathematics
Assembly:  Sage4 (in Sage4.dll)


public class Rationalizer

Inheritance Hierarchy