"I'm having" - an illness?
I am having trouble is written using the present continuous tense (also called present progressive tense).
The progressive tenses are used to put emphasis on the described event being in progress; the progressive also indicates habitual actions (I am walking a lot more now).
The interpretation that I would give to the sentences you wrote is
- "I'm having trouble coming up with a reliable method of comparing sets of data." — you are searching a reliable method also in the moment you are saying/writing that.
- "I have trouble coming up with a reliable method of comparing sets of data." — You cannot find a reliable method for comparing sets of data and you are searching a reliable method when you are saying/writing that, or you stopped searching for such method.
There is a difference between I have trouble and I had trouble, as the latter one means that you found a way to compare sets of data in a reliable way (and your trouble is done).
Am having is the present continuous tense and have is the simple present tense of the verb to have.
In the question, the first sentence means that I am having trouble now while the second sentence means that I usually have trouble coming up with a reliable method of comparing sets of data. The present continuous tense is also used to talk about something that will happen in the near future. For example:
I am going home tomorrow.
I'd like to touch on your description: I'm having an illness.
It seems the progressive is not used with illnesses, at least not in the UK. Medical problems should instead be referred to using have in the simple present tense. Therefore, we should say:
I have a cold.
rather than
I am having a cold.
I'm having a cold may imply other ridiculous meanings such as:
-
eating or drinking:
having dinner/ having a cold (eating dinner/eating a cold)
-
hosting a social occasion:
having a party/having a cold (hosting or giving a party/ hosting or giving a cold)
When I was at university, my English flatmates laughed at me when I said "I'm having a cold." That stuck with me ever since. [No pity votes, please. :-)]