Volume 10, Issue 2
In and Out
Download This Issue
Staff and Contributors
T R O T T ' S C O R N E R
Some Formatting Functions
We start by defining functions to format continued fractions. The function formatNonSimpleContinuedFraction formats a list of integers as a nonsimple continued fraction. To avoid autoevaluation of the result to a single rational number, we use HoldForm.
Here is an example.
We use formatNonSimpleContinuedFraction to define a similar function for simple continued fractions.
Here again is an example.
For a slightly less readable, but more space-conserving way to write such continued fractions, we define two more functions.
About Mathematica | Download Mathematica Player
© Wolfram Media, Inc. All rights reserved.