NEW YORK (AP) — The definition of insider trading has gotten a workout at the Manhattan federal trial of a San Francisco hedge fund founder after he testified that information he elicits from public company executives about earnings or future prospects is legal as long as he is not told exact numbers.

Doug Whitman's testimony over several days last week even raised questions from U.S. District Judge Jed Rakoff when Whitman described where he drew the line between illegal inside information and legitimate research at the West Coast hedge fund firm he founded in 1994.

Whitman was among dozens of people charged in a government crackdown over the last four years. He's the first to testify on his own behalf against charges that he earned nearly $1 million making trades based on illegal tips. Nearly all the rest have already pleaded guilty or been convicted. After closing arguments Friday, the jury was to resume deliberations this week.

"I didn't trade when I thought it was material nonpublic information," Whitman told the judge at one point.

"What about times when it was uncertain?" the judge asked.

Whitman said he would disregard the information if it was "highly uncertain."

His answers to questions posed by Assistant U.S. Attorney Christopher LaVigne led to more questions as the prosecutor tried to show that Whitman's view of what constituted "material non-public information" conflicted even with the rules set in his own company's insider trading policy. That policy said: "When in doubt, always assume the information is material."

Repeatedly, Whitman was asked where legitimate research crossed over to illegally obtained information.

"To know the number is not OK," he said, referring to a specific revenue or earnings result that was yet to be announced by a company. But even on that point he seemed later to hedge his answer when LaVigne asked him if he would trade based on information that somebody at a company gave him if it contained specific numbers.

"Depends who it comes from. For some people, it would be OK," Whitman said.

"So if somebody at the company told you, 'This is how we are going to report on revenue,' in some instances you think it would be OK to trade on that information?" the prosecutor asked.

"If they know the number or they were just ... " Whitman said before interrupting his thought to continue this way: "There is a difference between knowing the number and saying that's what they are thinking the number might be."

He said that if he were talking to someone in management at the company, he would decide whether he could use the information based on "if I thought that they knew the number or they were just making a guesstimate."

He later added: "If you think that the person knows the number, that's wrong."