Post Reply 
Somehow related to HP Calculators
01-04-2022, 11:13 AM
Post: #1
Somehow related to HP Calculators
Hi Everyone and Happy New Year to all of you !

This thread is not strictly related to calculators but somehow it could be interesting to code the solution
However, if it is not appropriated to be posted here the Administrators can remove it or move it
I'll try to make some examples, I apologize in advance if I'm not making this clear enough

Retention of the people in a company is a key aspect nowadays
We usually give to the best people a sort of bonus at the end of the year, let's say 500 €
The cost over a 6 years period is obviously 6 times the prize (excluding taxes but I'm more on the criteria here)

To motivate people to stay with the company, we want to modify this model toward
a "loyalty model", .i.e. the more you stay the more you gain

That would be something like this (on a 6 years plan)

for the first two years a 500 € pay raise each year
for the 3rd, 4th a 1000 € pay raise each year
for the 5th, 6th a 1500 € pay raise each year

Being a pay raise is sort of cumulative over the years and this change a lot the total company cost

My math is too rusty to get this straight, the question is, at the end of the 6th year what would it be the total of the pay raises ?

Eventually, can this be translated in a program (HP65) where these parameters can be changed
and the result can be foreseen playing with the parameters ?

Thanks in advance !
Take care

Edoardo & Alberto
Find all posts by this user
Quote this message in a reply
01-04-2022, 12:35 PM
Post: #2
RE: Somehow related to HP Calculators
Hello!

(01-04-2022 11:13 AM)albertofenini Wrote:  Eventually, can this be translated in a program (HP65) where these parameters can be changed
and the result can be foreseen playing with the parameters ?

The idea has a certain charm to it, but as an employee I would probably insist that my salary and my bonuses for 2022 be computed using modern and transparent methods and tools ;-)

However there might be somthing different that can be made from this idea: Why not give new applicants one of your HP65 calculators and a manual the day before the job interview and let them figure out their future salary and bonus for themselves using that tool? Those who come up with an exceptionally smart program will get an extra bonus on top....

Regards
Max
Find all posts by this user
Quote this message in a reply
01-04-2022, 12:50 PM
Post: #3
RE: Somehow related to HP Calculators
We can "move" paid raise of odd years to even. Here is a table for year 2k:
Code:
k    Δ       Δ²      Δ³
1    1000
2    2000    1000
3    3000    1000    0

cumulative paid raise (year 2n) = sum(1000*k, k=1..n) = 500*n*(n+1)

For year 6, cumulative paid raise = 500*3*4 = 6000

For completeness, for odd years:

cumulative paid raise (year 2n-1) = 500*n*(n+1) - 500*n = 500*n^2
Find all posts by this user
Quote this message in a reply
01-04-2022, 01:49 PM
Post: #4
RE: Somehow related to HP Calculators
Hi Max and thanks for replying

Let me tell you that this is by no mean thought to save money on employees shoulders
but rather trying to figure a way that given you actual salary your loyalty is awarded by adding
on top more that you could achieve with a linear model, in return I am expecting that the
economical aspect will be an additional (hopefully not the only one) reason to remain with the company

Training is a dramatic effort for the companies and there a number of big players out there ready to offer
very aggressive salaries once the (your) people is well trained

Said that, I need to understand where this method is going to take the company from a budget
point of view and check that is sustainable.

Using a formula is much more effective rather than doing the match each time

Let's make an example, starting salary is 10.000

1st year increase is 500 salary goes to 10.500
2nd year increase is 500 the salary goes to 11.000
3rd year increase is 1000 salary reaches 12.000
4th year increase is 1000 salary reaches 13.000
5th year increase is 1500 salary reaches 14.500
6th year increase is 1500 salary reaches 16.000

the earning for the guy is 10500+11000+12000+13000+14500+16000 = 77000
versus 10000*6 + 6000 (the sum of the bonus) = 66000

it reminds me somehow of a summation but the it is not constant and this makes difficult (for me)
to put it in a formula

Another idea is to start with a little raise but double it every year, may be this is even more actrattive and easier to explain

We are a cybersecurity company, so we don't really write code or look for people able to do it, thought this
could change with the new DevSecOps paradigm, and for how smart is the new generation, and they really are,
you should see their reaction when they see me use an HP65 or a similar one, I'm afraid asking to
write a code will dramatically reduce the number of candidates that will pass the interview ....

Any suggestions is very welcome !
Take care

(01-04-2022 12:35 PM)Maximilian Hohmann Wrote:  Hello!

(01-04-2022 11:13 AM)albertofenini Wrote:  Eventually, can this be translated in a program (HP65) where these parameters can be changed
and the result can be foreseen playing with the parameters ?

The idea has a certain charm to it, but as an employee I would probably insist that my salary and my bonuses for 2022 be computed using modern and transparent methods and tools ;-)

However there might be somthing different that can be made from this idea: Why not give new applicants one of your HP65 calculators and a manual the day before the job interview and let them figure out their future salary and bonus for themselves using that tool? Those who come up with an exceptionally smart program will get an extra bonus on top....

Regards
Max

Edoardo & Alberto
Find all posts by this user
Quote this message in a reply
01-04-2022, 03:08 PM
Post: #5
RE: Somehow related to HP Calculators
(01-04-2022 01:49 PM)albertofenini Wrote:  Let's make an example, starting salary is 10.000

1st year increase is 500 salary goes to 10.500
2nd year increase is 500 the salary goes to 11.000
3rd year increase is 1000 salary reaches 12.000
4th year increase is 1000 salary reaches 13.000
5th year increase is 1500 salary reaches 14.500
6th year increase is 1500 salary reaches 16.000

the earning for the guy is 10500+11000+12000+13000+14500+16000 = 77000
versus 10000*6 + 6000 (the sum of the bonus) = 66000

To get 6 paid raises, employee had to work 7 years: total earnings = 10000+77000 = 87000

Also, odd and even years have different paid raise formulas
Let s0 = starting salary, with 2n paid raises

Cumulative company paid to employee (worked 2n+1 years)
= s0 * (2n+1) + sum(500*k*k, k=1..n) + sum(500*k*(k+1), k=1..n)
= s0 * (2n+1) + 500 * sum(2k^2 + k, k=1..n)
= s0 * (2n+1) + 500 * (2*n*(n+1)*(2n+1)/6 + n*(n+1)/2)
= s0 * (2n+1) + 250 * n * (n+1) * (4n+5) / 3

For example, for working 7 years (n=3):

CAS> (s0*(2n+1) + 250*n*(n+1)*(4n+5)/3) (s0=10000, n=3)       → 87000

For completeness, if employee worked even years:

Cumulative company paid to employee (worked 2n years)
= s0 * (2n+1) + 250 * n * (n+1) * (4n+5) / 3 - (s0 + 500*n*(n+1))
= s0 * 2n + 250 * n * (n+1) * (4n-1) / 3
Find all posts by this user
Quote this message in a reply
01-04-2022, 04:21 PM
Post: #6
RE: Somehow related to HP Calculators
Hello Alberto,

(01-04-2022 01:49 PM)albertofenini Wrote:  Let me tell you that this is by no mean thought to save money on employees shoulders ...

No worries, I did not understand it that way :-) But for most employees their salary is really vital for every aspect of their life, so the idea that it gets calculated using a toy calculator (by today's standards) is somewhat intriguing.

(01-04-2022 01:49 PM)albertofenini Wrote:  ... and check that is sustainable.

Then even more so I would not entrust the well-being of my company on 50 year old self-restored calculators!

(01-04-2022 01:49 PM)albertofenini Wrote:  Using a formula is much more effective rather than doing the match each time

In your case with discontinuos input values it will not be easy to derive an equation that takes care of everyting. Your algorithm will have to take a list of values (bonus or pay rise for every year with the company) as input. The HP65 is not really suited to do that, especially if you expect your employees to stay with your company throughout their entire career (i.e. 40 or 45 years). It only has 9 memory registers some of which you will need for your calculation also. One solution that you already suggest would be a steady increase every year. You can easily calculate that by replacing your HP65 with an HP80 and using it's built-in TVM functions. (Or both cases, steady and discontinuos, with a little copy-pasting within an Excel spreadsheet - which still would be my choice of tool.)

(01-04-2022 01:49 PM)albertofenini Wrote:  ...the earning for the guy is 10500+11000+12000+13000+14500+16000 = 77000
versus 10000*6 + 6000 (the sum of the bonus) = 66000

If I were the employee I would know what to choose, same as if I were the employer.

(01-04-2022 01:49 PM)albertofenini Wrote:  Any suggestions is very welcome !

One thing comes to mind: Although I have lived and worked in Italy for more than 20 years (not really far away from you) that was not under the Italian taxation. I always paid my taxes in Germany. Here, bonus payments at the end of the year are something one tries to avoid as an employee since they are heavily taxed. I would prefer a 50 Euro montly increase over a single 1000 Euro bonus in December (even if on paper it almost looks like double). But in the end (i.e. after taxes) I will have about the same amount of cash in my pocket plus a better pension because of the higer monthly income. But I really don't know if that applies to Italy as well.

And one more (rather personal) thing that could motivate me to stay with my employer: Instead of a bonus or rise of salary, I would always prefer more free time instead. So for me, the most welcome thing would be one more day of holidays for every year with the company (or one hour less of work per week). Some companies here do it that way and it makes it very hard for long-time employees to leave.

Regards
Max
Find all posts by this user
Quote this message in a reply
01-04-2022, 04:42 PM (This post was last modified: 01-04-2022 04:43 PM by albertofenini.)
Post: #7
RE: Somehow related to HP Calculators
Hi Max

the use of an HP65 was just for the fun of it Smile

But you are right, an HP80 or any native financial calculator will do better for these kind of problems

I'll go get my HP-80
At the end this problem is very similar to that of a bank deposit revaluation with yearly growing interest,
is this you mean with TMV ?

The idea of giving free time is also excellent and I'm sure it will definitely used

Hope we are not going too much off topic ...

thanks a lot and take care


(01-04-2022 04:21 PM)Maximilian Hohmann Wrote:  Hello Alberto,

(01-04-2022 01:49 PM)albertofenini Wrote:  Let me tell you that this is by no mean thought to save money on employees shoulders ...

No worries, I did not understand it that way :-) But for most employees their salary is really vital for every aspect of their life, so the idea that it gets calculated using a toy calculator (by today's standards) is somewhat intriguing.

(01-04-2022 01:49 PM)albertofenini Wrote:  ... and check that is sustainable.

Then even more so I would not entrust the well-being of my company on 50 year old self-restored calculators!

(01-04-2022 01:49 PM)albertofenini Wrote:  Using a formula is much more effective rather than doing the match each time

In your case with discontinuos input values it will not be easy to derive an equation that takes care of everyting. Your algorithm will have to take a list of values (bonus or pay rise for every year with the company) as input. The HP65 is not really suited to do that, especially if you expect your employees to stay with your company throughout their entire career (i.e. 40 or 45 years). It only has 9 memory registers some of which you will need for your calculation also. One solution that you already suggest would be a steady increase every year. You can easily calculate that by replacing your HP65 with an HP80 and using it's built-in TVM functions. (Or both cases, steady and discontinuos, with a little copy-pasting within an Excel spreadsheet - which still would be my choice of tool.)

(01-04-2022 01:49 PM)albertofenini Wrote:  ...the earning for the guy is 10500+11000+12000+13000+14500+16000 = 77000
versus 10000*6 + 6000 (the sum of the bonus) = 66000

If I were the employee I would know what to choose, same as if I were the employer.

(01-04-2022 01:49 PM)albertofenini Wrote:  Any suggestions is very welcome !

One thing comes to mind: Although I have lived and worked in Italy for more than 20 years (not really far away from you) that was not under the Italian taxation. I always paid my taxes in Germany. Here, bonus payments at the end of the year are something one tries to avoid as an employee since they are heavily taxed. I would prefer a 50 Euro montly increase over a single 1000 Euro bonus in December (even if on paper it almost looks like double). But in the end (i.e. after taxes) I will have about the same amount of cash in my pocket plus a better pension because of the higer monthly income. But I really don't know if that applies to Italy as well.

And one more (rather personal) thing that could motivate me to stay with my employer: Instead of a bonus or rise of salary, I would always prefer more free time instead. So for me, the most welcome thing would be one more day of holidays for every year with the company (or one hour less of work per week). Some companies here do it that way and it makes it very hard for long-time employees to leave.

Regards
Max

Edoardo & Alberto
Find all posts by this user
Quote this message in a reply
01-04-2022, 05:38 PM
Post: #8
RE: Somehow related to HP Calculators
Hello!

(01-04-2022 04:42 PM)albertofenini Wrote:  is this you mean with TMV ?

TVM stands for "time value of money" and is often used as a shortcut for all kinds of financial calculations.

(01-04-2022 04:42 PM)albertofenini Wrote:  iHope we are not going too much off topic ...

Haven't calculating machines been inventend to free us from tediuos tasks and give us more time to live? Just imagine what Galilei and Kepler could have achieved if they had not wasted half their lifes doing celestial calculations by hand. The HP-65 was invented 400 years too late!

Saluti
Max
Find all posts by this user
Quote this message in a reply
01-04-2022, 07:10 PM
Post: #9
RE: Somehow related to HP Calculators
Where I once worked, a job candidate was given a Stardate,
and they had to answer the the name of the episode and the name of guest star (if any).

Correctly answering the question was a good sign that they were a good fit.

(just kidding, but we did consider it briefly)

10B, 10BII, 12C, 14B, 15C, 16C, 17B, 18C, 19BII, 20b, 22, 29C, 35, 38G, 39G, 41CV, 48G, 97
Find all posts by this user
Quote this message in a reply
01-05-2022, 07:42 AM (This post was last modified: 01-05-2022 07:42 AM by EdS2.)
Post: #10
RE: Somehow related to HP Calculators
If you give the same raise every year, the salary goes up linearly. If you increase the raise linearly, the salary will go up quadratically. This just might be sustainable for the business. But if you increase the raise each year by multiplying it by a constant, now the salary is exponential. This is famously not sustainable in the long run!

I do like Albert's approach: by looking at pairs of years, the staircase of salary increases now looks like a straight line, and everything is easier.

A note on vocabulary: a bonus is not (in UK English) anything like a salary increase. It's a one-time payment. As such, it is a variable reward which doesn't commit the company to ever-increasing costs. And, ideally, the salary as such - the base salary, without the bonus - is enough for the employee to feel comfortable. The bonus is optional, and in tough times the bonus may disappear.

A note on Italian employment: I had an understanding that in Italy the employees are paid 1/13 of their annual salary each month. At the end of the (calendar?) year, the 13th payment is paid, which allows it to take into account any complicated taxation or other deduction, and also allows it to act as a Christmas bonus - even though everything could, in principle, be figured out with 12 equal monthly payments.

Another calendrical oddity: while it's normal for salaried people in the UK to be paid monthly, sometimes the payment is (or was) made on a specific day of the week, which means the employee who thinks in terms of weekly budgets now needs to consider the 4 week month and the 5 week month, and budget accordingly.
Find all posts by this user
Quote this message in a reply
01-05-2022, 01:52 PM
Post: #11
RE: Somehow related to HP Calculators
Hi

(01-05-2022 07:42 AM)EdS2 Wrote:  If you give the same raise every year, the salary goes up linearly. If you increase the raise linearly, the salary will go up quadratically. This just might be sustainable for the business. But if you increase the raise each year by multiplying it by a constant, now the salary is exponential. This is famously not sustainable in the long run!

I do like Albert's approach: by looking at pairs of years, the staircase of salary increases now looks like a straight line, and everything is easier.

We need to come up with smart ideas if we don't want to see people going somewhere else,
the point is that the taxation is so high that for both the employer and the company is not worth,
every € of raise goes in taxes for more then 50%


A note on vocabulary: a bonus is not (in UK English) anything like a salary increase. It's a one-time payment. As such, it is a variable reward which doesn't commit the company to ever-increasing costs. And, ideally, the salary as such - the base salary, without the bonus - is enough for the employee to feel comfortable. The bonus is optional, and in tough times the bonus may disappear.

Thanks, I always like to improve my vocabulary, the meaning is pretty much the same here,
a bonus is a una-tantum and can be denied the year after, a pay raise is for all your career


A note on Italian employment: I had an understanding that in Italy the employees are paid 1/13 of their annual salary each month. At the end of the (calendar?) year, the 13th payment is paid, which allows it to take into account any complicated taxation or other deduction, and also allows it to act as a Christmas bonus - even though everything could, in principle, be figured out with 12 equal monthly payments.

This is not equal for everyone, it depends on your type of contract, there are contracts that have 14 payments, the 14th
nearly at the end of June, the 13th before Christmas and contracts that have 13 payments, but there are
also contracts with even more payments, typically people working in banks have those, but its not that
because of that you earn more, once discussed you total salary, based on the type of contracts you may
have different number of payments.
As for the day, here it's usually at the end of month, the important thing is that payments are on a regular base



Another calendrical oddity: while it's normal for salaried people in the UK to be paid monthly, sometimes the payment is (or was) made on a specific day of the week, which means the employee who thinks in terms of weekly budgets now needs to consider the 4 week month and the 5 week month, and budget accordingly.

Edoardo & Alberto
Find all posts by this user
Quote this message in a reply
01-05-2022, 02:00 PM
Post: #12
RE: Somehow related to HP Calculators
To address the original question, may I suggest the following:

Code:

PROG
100
001: 23    : LBL
002: 11    : A
003: 33 01 : STO 1
004: 24    : RTN
005: 23    : LBL
006: 12    : B
007: 33 02 : STO 2
008: 24    : RTN
009: 23    : LBL
010: 13    : C
011: 00    : 0
012: 33 03 : STO 3
013: 33 04 : STO 4
014: 24    : RTN
015: 23    : LBL
016: 14    : D
017: 34 03 : RCL 3
018: 84    : R/S
019: 02    : 2
020: 61    : +
021: 02    : 2
022: 81    : /
023: 31    : f
024: 83    : INT
025: 34 02 : RCL 2
026: 71    : x
027: 33    : STO
028: 61    : +
029: 04    : 4
030: 34 01 : RCL 1
031: 61    : +
032: 84    : R/S
033: 34 03 : RCL 3
034: 01    : 1
035: 61    : +
036: 33 03 : STO 3
037: 34 04 : RCL 4
038: 34 01 : RCL 1
039: 61    : +
040: 84    : R/S
041: 44    : CLx
042: 84    : R/S
043: 84    : R/S
044: 84    : R/S
045: 24    : RTN
046: 35 01 : g NOP
047: 35 01 : g NOP
048: 35 01 : g NOP
049: 35 01 : g NOP
050: 35 01 : g NOP
051: 35 01 : g NOP
052: 35 01 : g NOP
053: 35 01 : g NOP
054: 35 01 : g NOP
055: 35 01 : g NOP
056: 35 01 : g NOP
057: 35 01 : g NOP
058: 35 01 : g NOP
059: 35 01 : g NOP
060: 35 01 : g NOP
061: 35 01 : g NOP
062: 35 01 : g NOP
063: 35 01 : g NOP
064: 35 01 : g NOP
065: 35 01 : g NOP
066: 35 01 : g NOP
067: 35 01 : g NOP
068: 35 01 : g NOP
069: 35 01 : g NOP
070: 35 01 : g NOP
071: 35 01 : g NOP
072: 35 01 : g NOP
073: 35 01 : g NOP
074: 35 01 : g NOP
075: 35 01 : g NOP
076: 35 01 : g NOP
077: 35 01 : g NOP
078: 35 01 : g NOP
079: 35 01 : g NOP
080: 35 01 : g NOP
081: 35 01 : g NOP
082: 35 01 : g NOP
083: 35 01 : g NOP
084: 35 01 : g NOP
085: 35 01 : g NOP
086: 35 01 : g NOP
087: 35 01 : g NOP
088: 35 01 : g NOP
089: 35 01 : g NOP
090: 35 01 : g NOP
091: 35 01 : g NOP
092: 35 01 : g NOP
093: 35 01 : g NOP
094: 35 01 : g NOP
095: 35 01 : g NOP
096: 35 01 : g NOP
097: 35 01 : g NOP
098: 35 01 : g NOP
099: 35 01 : g NOP
100: 35 01 : g NOP
CARD
6
Title: Loyalty Salary
A: Salary
B: Bonus
C: Start
D: Yr,Pmt,Tot
E: 
HELP
1

END

You enter the starting salary (10000) and press A.
You enter the bonus amount (500) and press B.
Press C to initialize.
Press D, get year (0). Press R/S, get salary at end of year 0. Press R/S, get salary plus total bonuses paid.
Press D again, get year (1). Press R/S, get salary at end of year 1. Press R/S, get salary plus total bonuses paid.
Repeat the press D step for each subsequent year.

The results I get are:
10000 A "10000.00"
500 B "500.00"
C "0.00"
D "0.00" R/S "10500.00" R/S "10500.00"
D "1.00" R/S "10500.00" R/S "11000.00"
D "2.00" R/S "11000.00" R/S "12000.00"
D "3.00" R/S "11000.00" R/S "13000.00"
D "4.00" R/S "11500.00" R/S "14500.00"
D "5.00" R/S "11500.00" R/S "16000.00"
etc

Register 1 stores salary. Register 2 stores the bonus amount. Register 3 is a counter for years employed. Register 4 accumulates the total bonuses paid.

It isn't quite what was asked for. The final figure from the LBL D routine should include each years salary, not just one year's worth. That'd be fixed by moving the STO + 4 from line 027 to just after the + currently on line 031.

I accept that this doesn't account for Italian or German taxes and that Excel is probably an easier approach these days. However, had the problem been considered in the HP-65's day, Excel wouldn't have been around.

The above code plugs directly into my HP-65 microcode emulator (can be run directly on the website, click the digit display then Program and the input box then paste). It should run in other emulators too or on the real thing.

Whilst I'm in Australia - slightly south of Teenix - and not looking for a job in Italy, I think I've met the selection criteria :-)

All the best,

- Greg from sydneysmith.com
Visit this user's website Find all posts by this user
Quote this message in a reply
01-05-2022, 02:55 PM
Post: #13
RE: Somehow related to HP Calculators
(01-04-2022 04:21 PM)Maximilian Hohmann Wrote:  I always paid my taxes in Germany. Here, bonus payments at the end of the year are something one tries to avoid as an employee since they are heavily taxed. I would prefer a 50 Euro montly increase over a single 1000 Euro bonus in December (even if on paper it almost looks like double).

My guess is bonus seemed to be heavily taxed due to progressive tax structure.
But, at the end of the day, you'd owe the same taxes either way, 1 time bonus or spread-out over the year.

Here's why your bonus is taxed so high
Quote:It comes down to what's called "supplemental income." Although all of your earned dollars are equal at tax time, when bonuses are issued, they're considered supplemental income by the IRS and held to a higher withholding rate.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)