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,201 of 184,368
Downloads: 148,408

Daily

Ranking: 25,362 of 184,353
Downloads: 4

Depended by

RankDownloadsName

Depends on

RankDownloadsName
101,005,950,343rake
205184,824,030rdoc
1,74214,906,384rake-compiler
3,6632,596,565rcov

Owners

#GravatarHandle
1iconvalodzka