simon-git: spigot (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Sat May 2 14:56:12 BST 2015


TL;DR:
  349af69 Implement tentative output in continued fraction modes.

Repository:     git://git.tartarus.org/simon/spigot.git
On the web:     http://tartarus.org/~simon-git/gitweb/?p=spigot.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2015-05-02 14:56:12

commit 349af694b58e319a59280b7bd9ef4f79450dd9f4
web diff http://tartarus.org/~simon-git/gitweb/?p=spigot.git;a=commitdiff;h=349af694b58e319a59280b7bd9ef4f79450dd9f4;hp=6dc1e63ea6838ee1aa86fa9a74fd5358a2ca13ad
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat May 2 14:49:32 2015 +0100

    Implement tentative output in continued fraction modes.
    
    This is mostly just what you'd expect - if it looks as if the next
    continued-fraction term is going to be an exact integer and terminate
    the fraction, then tentative output is produced in the obvious way.
    The one slightly counterintuitive case is the one in which we can
    _already_ output that final term as definite, but then aren't sure
    whether the fraction terminates there. This occurs when the sign of
    the residual is known, but not whether it's zero.
    
    For example, try adding or subtracting abs(sin(pi)) to a rational, in
    -c mode. One of the two will produce the final CF term as tentative
    output; the other will produce it as definite output, and then give
    tentative output saying that it might also be exact; which is which
    will depend on the parity of the number of terms in the rational's CF
    expansion.

 TODO.txt     |   17 ---
 cfracout.cpp |  379 ++++++++++++++++++++++++++++++++++++++++++++++++++--------
 test.sh      |   61 ++++++++--
 3 files changed, 382 insertions(+), 75 deletions(-)



More information about the tartarus-commits mailing list