Click here to Skip to main content
15,881,709 members
Articles / General Programming / Algorithms

Stern-Brocot Trees and their Applications

Rate me:
Please Sign up or sign in to vote.
4.96/5 (25 votes)
1 May 2021MIT7 min read 21.3K   291   24  
A data structure for finding best rational approximations
Rational approximations are useful when trying to avoid floating point rounding errors. This article describes a method for finding the 'best' such approximation.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Canada Canada
Mircea is the embodiment of OOP: Old, Opinionated Programmer. With more years of experience than he likes to admit, he is always opened to new things, but too bruised to follow any passing fad.

Lately, he hangs around here, hoping that some of the things he learned can be useful to others.

Comments and Discussions