HP3000-L Archives

May 1999, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Tue, 11 May 1999 11:38:29 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
Stan writes:

...oops...forgot about the 500/1500 stuff.

How about:

   modify loop 1 to give $500 to each eligible employee.

   remaining_dollars is the amount of money left after this step.

Now, use the pool_hours calculated in loop 1 to figure the worth of
each unmissed hour:

   bonus_per_hour :=remaining_dollars / pool_hours;

   for each eligible employee,
        temp := (160 - missed_hours) *  bonus_per_hour;
        if temp > 1000 then
           temp := 1000;
        give employee $temp;
        remaining_dollars := remaining_dollars - temp;

Now, we may have some money left over (because of the $1500 cap):

   while remaining_dollars > 0 do

      count # eligble employess who haven't received 1500.
      Call that number N

      dollars_this_time := remaining_dollars / N;

      for each eligible employee who hasn't received $1500 yet:
         temp := dollars_this_time;
         if temp + amount_given_this_employee > 1500 then
            temp := 1500 - amount_given_this_employee;

         give employee temp;

         remaining_dollars := remaining_dollars - temp;
         end
      end

--
Stan Sieler                                          [log in to unmask]
                                     http://www.allegro.com/sieler.html

ATOM RSS1 RSS2