+ Reply to Thread
Results 1 to 4 of 4

algorithm to divide by 6

  1. #1
    Bucky
    Guest

    algorithm to divide by 6

    I'm trying to reverse engineer an algorithm to divide up interest
    payments over 6 months. I've got two examples below. (They're
    originally in cents, but I've converted to integers so it's easier to
    read.) I couldn't figure out an algorithm that would work for both.

    46 = 8 + 7 + 8 + 7 + 8 + 8
    58 = 10 + 9 + 10 + 10 + 9 + 10

    (In case you were wondering, these are I-Bonds payments).


  2. #2
    Anthony Buckland
    Guest

    Re: algorithm to divide by 6

    Bucky wrote:

    >I'm trying to reverse engineer an algorithm to divide up interest
    >payments over 6 months. I've got two examples below. (They're
    >originally in cents, but I've converted to integers so it's easier to
    >read.) I couldn't figure out an algorithm that would work for both.
    >
    >46 = 8 + 7 + 8 + 7 + 8 + 8
    >58 = 10 + 9 + 10 + 10 + 9 + 10
    >
    >(In case you were wondering, these are I-Bonds payments).
    >
    >
    >

    I'll take a hack at it, inspired by the fact that there are 31 days in
    each of
    July and August. The algorithm is to divide the interest equally as far as
    possible, and distribute the rest over the longer months. The first line
    would relate to March through August, and the second to May through
    October. Now tell me those aren't the relevant periods, in which case
    I'm wrong.


  3. #3
    Bucky
    Guest

    Re: algorithm to divide by 6

    Anthony Buckland wrote:
    > >46 = 8 + 7 + 8 + 7 + 8 + 8
    > >58 = 10 + 9 + 10 + 10 + 9 + 10

    > I'll take a hack at it, inspired by the fact that there are 31 days in
    > each of
    > July and August. The algorithm is to divide the interest equally as far as
    > possible, and distribute the rest over the longer months. The first line
    > would relate to March through August, and the second to May through
    > October. Now tell me those aren't the relevant periods, in which case
    > I'm wrong.


    The second line does correspond with May to Oct, but the first line is
    for Nov to Apr. I think I'm going to give up on this, because I also
    found another example that contradicts #2. I must be missing a
    dimension here. The month was a good idea, but it doesn't seem to
    match.

    example 3 (Nov to Apr): 58 = 10 + 9 + 10 + 10 + 10 + 9


  4. #4
    Keith A. Lewis
    Guest

    Re: algorithm to divide by 6

    "Bucky" <uw_badgers@email.com> writes in article <1129768754.132525.146670@g44g2000cwa.googlegroups.com> dated 19 Oct 2005 17:39:14 -0700:
    >I'm trying to reverse engineer an algorithm to divide up interest
    >payments over 6 months. I've got two examples below. (They're
    >originally in cents, but I've converted to integers so it's easier to
    >read.) I couldn't figure out an algorithm that would work for both.
    >
    >46 = 8 + 7 + 8 + 7 + 8 + 8
    >58 = 10 + 9 + 10 + 10 + 9 + 10
    >
    >(In case you were wondering, these are I-Bonds payments).


    Financial institutions normally keep account balances accurate to at least
    hundredths of cents, although what they show on your statement is rounded to
    the cent.

    --Keith Lewis klewis {at} mitre.org
    The above may not (yet) represent the opinions of my employer.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1