# Difference between revisions of "Proposal: Digit Strings which Represent Continued Fractions"

This article is a proposed description of a means by which to express numbers in a generalized continued fraction format as represented by a string of digits. It will not discuss other notations for continued fractions. By way of analogy, the subject matter of this article would be similar to a description of the decimal system (base) and will not touch on subject matter which is similar to means of expressing numbers as summations (big operator "") or formal polynomials in with coefficients in , even though all of these are mutually equivalent.

For the purposes of this article: All expressions are big-endian and microdigits are in traditional decimal. PEMDAS is obeyed.

Let , where and are integers for all (see https://oeis.org/wiki/Continued_fractions#Gauss.27_Kettenbruch_notation ). In fact, for all i, we will canonically restrict and to nonnegative integers such that if , then and for all ; this is a perfectly natural and standard set of restrictions to make and does not actually diminish the set of numbers which are expressible in this format, but the restriction is not technically necessary for Lojban. Then we will denote by the continued fraction representation ; the whole rhs representation is called a string. Notice that the integer part is included. In this format, for each , "" forms a single unit called a macrodigit; for each , "" and "" each are microdigits; the colon ("") separates microdigits and the comma ("") separates macrodigits. Microdigits can be expressed in any base or other representation and macrodigits could be reversed or slightly rearranged (such as being of form ""; however, for our purposes here microdigits will be expressed in big-endian traditional decimal and macrodigits will be formed and ordered as shown; the specification herein proposed will obligate the user to express the macrodigits in the form which is shown (id est: of form ""; within any given macrodigit, the first microdigit expressed represents and the second (and final) microdigit expressed represents , only) but the other features aforementioned are not guaranteed, although they may normally be assumed as a contextless default. In order to be clear: in this representation, each macrodigit will consist of exactly two microdigits - namely, and in that order, for all - and these microdigits will be separated explicitly by "pi'e"; meanwhile, macrodigits will be separated explicitly by "pi". In this representation, I will denote a not-explicitly-specified microdigit by a pair of consecutive underscores (""). In the 'big-endian' arrangement of the macrodigits (as herein depicted), the first microdigit () represents the 'integer part' of the expression.

In this system, let "pi'e" represent ":" and let "pi" represent ",", each bijectively. Then the basic method of expressing a continued fraction is to just read where each microdigit is expressed in some base which represents integers, the parenthesis are not mentioned, the separators being named/pronounced as before, "ra'e" being used in order to create cyclic patterns or to extend the string indefinitely, and the string being terminated as any numeral string could or would be. The interpretation of the whole string according to these rules for continued fractions would be specified via JUhAU.

A string terminates if and only if "ra'e" is not explicitly used. "ra'e" will couple with exactly one microdigit, and exactly every following explicitly mentioned microdigit in that position of their macrodigits will be considered to be part of a repetitious sequence applying to/running over the microdigits in that position of their macrodigits; the other microdigit is unaffected by it. Moreover, it can couple with "pi'e" as well (see below), but this occurs iff "ra'e" is explicitly mentioned immediately prior to exactly an explicitly mentioned "pi'e". If it couples with for some , then it will cyclically repeat that and all explicitly mentioned for all in each spot until the last (which either will be explicitly mentioned and defined as last by the closure of the string scope (formally, all subsequent will be trivial), or will be nonexistent according to the next point); iff it couples with for some , then the string is extended to infinite length and there exists no 'last ' (meaning that any repetition on will also continue ad infinitum). Thus, .