GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Viorel/ContinuedFractions: Convert decimal and rational numbers to or from regular continued fractions.

BranchesTags
Open more actions menu

Latest commit

 

History

30 Commits
30 Commits

Folders and files

NameName
Last commit message
Last commit date
ContinuedFractions
ContinuedFractions
 
 
ContinuedFractionsLibrary
ContinuedFractionsLibrary
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
ContinuedFractions.slnx
ContinuedFractions.slnx
 
 
README.md
README.md
 
 
Screenshot1.png
Screenshot1.png
 
 
Screenshot2.png
Screenshot2.png
 
 

Repository files navigation

Continued Fractions

An experimental tool that converts decimal and rational numbers to continued fractions, and vice versa. The program also displays the convergents, and converts the simple continued fractions to regular ones.

For example:

Entered number The result
12.34 [ 12; 2, 1, 16 ]
5/6 [ 0; 1, 5 ]
0.8(3) [ 0; 1, 5 ]
Entered continued fraction The result
[ 12; 2, 1, 16 ] 12.34
[ 0; 1, 5 ] 0.8(3)
[ 1; (2) ] ≈1.41421356

Note. The “( )” denotes periodic parts.

The program accepts various kinds of numbers:

Input Meaning
123 Integer number
12.34 Decimal number
0.8(3) Repeating (recurring) decimal
5/6 Fraction
1.2e‑7 Scientific notation (1.2×10⁻⁷)
pi Number π ≈ 3.1415926 (1000 digits)
e Euler's (Napier's) number e ≈ 2.7182818 (1000 digits)

Screenshots

Converting a decimal or rational number to regular continued fraction:

Converting a decimal number or fraction to regular continued fraction

Converting a simple continued fraction to decimal and rational number. The output also includes the corrected regular continued fraction:

Converting a continued fraction to decimal number and fraction

Usage

The program runs in this environment:

  • Windows 11 or Windows 10 (64-bit),
  • .NET 9.

To use it, download and unzip the latest archive from the Releases section. Launch the ContinuedFractions executable.

Alternatively, the source files can be got from the Releases section too and compiled in Visual Studio 2026 that includes the “.NET desktop development” workload. The program is made in C#, WPF.

References

  • Dr Ron Knott, An introduction to Continued Fractions — https://r-knott.surrey.ac.uk/Fibonacci/cfINTRO.html
  • Conrad, K., Negation and Inversion of Continued Fractions — https://kconrad.math.uconn.edu/blurbs/ugradnumthy/contfrac-neg-invert.pdf
  • Periodic Continued Fraction — https://mathworld.wolfram.com/PeriodicContinuedFraction.html

About

Convert decimal and rational numbers to or from regular continued fractions.

Topics

continued-fractionscsharpdecimal-number-converterdecimal-numbersfarey-sequencefractionsrational-numberswpf

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.