Back to functions

continued_fraction


Continued Fraction

Returns the fraction as a continued fraction. The first digit returned is the sign. The remainder is the continued fraction.

Usage: nerdamer("continued_fraction(x)")


Parameters

expression x Returns the appropriate value if possible otherwise it returns the function with the simplified expression

EXAMPLES:
var x = nerdamer('continued_fraction(3.14159)');
console.log(x.toString());
x = nerdamer('continued_fraction(1/6)')
console.log(x.toString());
x = nerdamer('continued_fraction(-5/4)')
console.log(x.toString());
OUTPUT:
Back to functions