Bob, when addressing my indiscreet question regarding his and his wife's ages, came up with the following answer:
"Take my age now, multiply it by my age on the wedding day, then subtract my wife's present age
multiplied by her age on our wedding day.
If then you add the difference between her
present age multiplied by my age on the wedding day and my
present age multiplied by her wedding day age ( making no errors in your proceeding) you should end up with 511 as a result."
Since Bob knew (and rightly so) that I was ignorant about how long they were married, he assumed that either his secret will stay undisclosed forever or that I will humbly request additional data.
How wrong he was!
Without calculator, just pen and paper and 10-15 minutes of your time you will solve it too.
I bet programming is not needed.