This documentation is compiled for the latest release of Mathos Core Library
Assembly: Mathos (in Mathos.dll) Version: 1.0.5.1 (1.0.5.1)
Converts a decimal to Stern-Brocot number system consisting of L's and R's. In order to convert a fraction, use the non-static method inside the fraction class.
Namespace: Mathos.Arithmetic.Fractions
Assembly: Mathos (in Mathos.dll) Version: 1.0.5.1 (1.0.5.1)
Syntax
public static string ToSternBrocotSystem( decimal realNumber, bool continious = false, int iterations = 50 )
Parameters
- realNumber
- Type: SystemDecimal
Any real number you want to approximate. - continious (Optional)
- Type: SystemBoolean
If set to true, the decimal part of the number will be treated as continious. That is, 0.9 would be the same as 1. - iterations (Optional)
- Type: SystemInt32
The number of times the conversion should be performed. The more, the more accurate.
Return Value
Type: StringSee Also