![]() Volume 10, Issue 2 Articles In and Out Trott's Corner Beyond Sudoku New Products New Publications Calendar News Bulletins New Resources Classifieds Download This Issue Editorial Policy Staff and Contributors Submissions Subscriptions Advertising Back Issues Contact Information |
T R O T T ' S C O R N E R
Some Formatting FunctionsWe 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 © 2006 Wolfram Media, Inc. All rights reserved. |