Categories: None [Edit]

frac

https://rubygems.org/gems/frac
https://github.com/valodzka/frac
Find rational approximation to given real number. Based on the theory of continued fractions if x = a1 + 1/(a2 + 1/(a3 + 1/(a4 + ...))) then best approximation is found by truncating this series (with some adjustments in the last term). Note the fraction can be recovered as the first column of the matrix ( a1 1 ) ( a2 1 ) ( a3 1 ) ... ( 1 0 ) ( 1 0 ) ( 1 0 ) Instead of keeping the sequence of continued fraction terms, we just keep the last partial product of these matrices.

Total

Ranking: 13,001 of 183,477
Downloads: 147,681

Daily

Ranking: 63,432 of 183,470
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
10969,073,546rake
210172,490,060rdoc
1,74113,941,992rake-compiler
3,5842,591,929rcov

Owners

#GravatarHandle
1iconvalodzka