Sen. Ted Cruz (R-Tex.). (Jose Luis Magana/AP)

He has attained almost mythic stature in the new big-money world of presidential politics — a reclusive computer programmer, a hedge fund magnate and the biggest individual super-PAC donor so far of this campaign cycle.

Robert L. Mercer worked on a team that revolutionized the arcane world of machine translation. Then he made his fortune devising algorithms to outwit Wall Street traders.

Throughout it all, he has avoided attention.

The tiny public record reveals a man of exacting and perhaps unreasonable standards, sued by his household staff in a dispute over, among other things, partially filled shampoo bottles. He has emerged very occasionally and cast himself as a computer nerd with a romantic attachment to machines.

“I loved the solitude of the computer lab late at night,” he said in a rare speech last year. “I loved the air-conditioned smell of the place. I loved the sound of the disks whirring and the printers clacking.”

Bob Mercer attends the World Science Festival Gala on April 7, 2014, in New York. (Andrew Toth/Getty Images)

Now, the supremely private Mercer is putting his obscurity at risk by assuming the role of kingmaker in the post-Citizens United era of unrestricted giving — and, in his inscrutable way, leaving the political world uncertain about his goals and motives.

Mercer, 69, co-chief executive of the wildly successful New York hedge fund company Renaissance Technologies, burst into the public eye this year when he poured $11 million into a super PAC supporting Republican presidential candidate Ted Cruz.

Then came a political curveball: In mid-June, that PAC directed $500,000 to a PAC supporting a Cruz rival, former Silicon Valley executive Carly Fiorina. The pro-Cruz group listed the expenditure on required federal disclosure forms, describing its purpose, perplexingly, as “other.”

The payments — to support both Cruz and Fiorina — have added to the air of mystery around Mercer. Is he motivated purely by conservative ideology? Or is there something more, such as translating his big-data expertise into campaigning? Cruz is building an aggressive voter targeting operation, bringing in a pro-Republican company specializing in personality profiling that has been paid millions by Mercer-backed political committees.

Mercer declined through a spokesman to comment.

The role of a multimillionaire bolstering Cruz’s candidacy stands out in part because of an apparent contradiction. The senator from Texas has waged an anti-establishment campaign by assailing wealthy GOP donors who, he says, force party leaders to the left on social issues. Cruz took to the Senate floor last week to say top donors “actively despise our base, actively despise the men and women who showed up and voted you and me into office.”

Cruz caught Mercer’s attention a few years ago at a meeting of the free-enterprise advocacy group Club for Growth. Mercer was with his middle daughter, Rebekah Mercer, who later feted the candidate with a lavish fundraiser at her Manhattan apartment.

Whatever led Robert Mercer to put so much of his money into supporting Cruz, those who have known the computer-science PhD say it no doubt reflected a thought process rooted in logic and an interest in limited government. They describe a relentlessly careful statistician, deeply concerned about the economic direction of the country, who avoids the social whirl of fundraising — the anti-Sheldon Adelson of the GOP.

“Bob, I think, would like to keep completely out of the limelight,” said Nick Patterson, a computational biologist at the Broad Institute in Cambridge, Mass., who until 2001 worked with Mercer at Renaissance Technologies.

Mercer’s handouts have startled those they help and those they hurt. In Oregon, Republican congressional candidate Art Robinson was stunned by the support he received the first time he tried to unseat Rep. Peter A. DeFazio (D) in 2010.

“Suddenly the TV lit up with pro-Robinson ads we didn’t know were coming,” Robinson recalled.

The out-of-the-ether advertising still riles DeFazio, who retained his seat. “I assume because they are both radical anti-tax, anti-regulation, rabidly antiabortion and absolute climate-change deniers, Mercer decided to pump millions of dollars into my opponent’s campaign,” DeFazio said. “It came out of nowhere, and in the end it went nowhere.”

Enigmatic money man

Mercer’s low profile is matched by the culture of closed doors surrounding him.

He declined to allow a reporter to visit his company, headquartered in the sleepy Long Island town of East Setauket, or his Head of the Harbor mansion. The $37 million Mercer Family Foundation, which contributes hundreds of thousands of dollars to such conservative hubs as the Heritage Foundation and the Heartland Institute and is run by Rebekah Mercer, is so hard to locate online that it is sometimes confused with the rudimentary Web site of a West Coast Mercer Family Foundation that gives small grants to aspiring math and physics students. Photos abound of Mercer’s sleek 203-foot super-yacht, the Sea Owl, but there are few of the tycoon himself. Even Ruby et Violette, the concierge cookie company owned by his three daughters that offers tantalizing opportunities to “seduce someone” and “indulge yourself” with mouthwatering confections, has closed its bijou Hell’s Kitchen and Chelsea storefronts.

The mathematicians and physicists who staff Renaissance Technologies will not discuss their boss’s role in generating consistently high returns from its flagship Medallion fund. Peter Brown, Mercer’s longtime collaborator first at IBM and now as co-CEO of Renaissance, declined to comment. James Simons, the code-breaker-cum-mathematician who brought Mercer and Brown to his company in 1993 and gives to liberal causes, chose not to answer questions. And Sebastian Mallaby, who interviewed Brown and Mercer for his 2010 book, “More Money than God,” says it’s hard to add anything to his description of Mercer there — “an icey cold poker player [who] never recalled having a nightmare.”

Even Robinson, the former congressional candidate whose Oregon Institute of Science and Medicine has received hundreds of thousands of dollars from the Mercer foundation, said he and “Mr. Mercer” have talked about “power plants and things” but “never about his personal background.” Mercer, he said, is a loyal reader of the institute’s publications: “I talk to him through the newsletter, and he chimes in by e-mail when he’s thought I’ve missed something.”

The language Mercer has deployed so effectively is computer code — a skill that is shrouded in secrecy at Renaissance. But earlier work Mercer did with a small team at IBM — where his boss once jokingly referred to him as an “automaton,” according to Mallaby’s book — was published. It offers clues to how Mercer harnessed big data to transform a field of research— in this case creating the basis for everyday tools such as Google Translate.

The genius of the approach lay in treating computers like machines, not human beings. Linguists, Mallaby explains, had been trying to teach computers to translate by drilling them like middle-schoolers in the finer points of foreign grammar — “that ‘la fille’ means ‘the girl’ and ‘les filles’ is the plural form,” and so on.

Mercer and Brown did not speak French. Instead, they fed reams of parallel French and English texts from Canadian parliamentary records into a computer. They quickly found word-for-word correlations (milk = lait) and, by applying different algorithms, teased out more sophisticated patterns, where a single word might be equivalent to a phrase (starred = marqué d’un astérisque).

“I’ve taken great pleasure in programs that do remarkable things,” Mercer said in the speech he gave last year when he received an award for computational linguistics.

Captured on video and posted to the Web, the speech provides a rare chance to see Mercer in action.

There he is, the enigma himself, with cropped platinum hair, piercing stare and pursed-lip smile, in full business attire as he confesses through glints of humor to an audience of academics how ill at ease he feels. An hour-long speech, Mercer explains from behind the protective skirt of the podium, would be “more than I typically talk in a month.” He says he shares his year of birth — 1946 — with ENIAC, the world’s first electronic general-purpose computer (a.k.a. “the Great Brain”), and proceeds to mark off life’s milestones not with new bicycles, marriage proposals or children’s births but with the advent of ever more powerful technology.

He talks also of his “jaundiced view” of government-financed research — feelings that originated during a college job at a military base where he rewrote a program, only to see the “powers that be” make it more cumbersome again. Their goal, he concluded, is “not so much to get answers as it is to consume the computer budget.”

Now, in his support for Cruz, Mercer is backing a presidential candidate whose campaign says it is microtargeting voters using cutting-edge “psychographic” analysis that measures interests, attitudes and opinions.

While Mercer’s support for the pro-Cruz super PAC means that he is not a part of the official Cruz campaign, there is a potential financial connection between him and a data company — Cambridge Analytica — that is embedded in Cruz’s headquarters. The firm entered the U.S. market in 2012 and works only for Republican causes, according to CEO Alexander Nix.

Out of $2.9 million that federal forms show have been disbursed to the company over the past two years, $2.5 million, or about 88 percent, came from committees that have taken donations from Mercer or close family members. The records show that Cambridge Analytica directed some of this money to other firms for online ads.

Politico, citing unnamed sources, reported in July that Mercer owned a share of the company. Publicly available corporate records do not name the company’s owners.

Nix said he would not discuss “clients, the board or our investors.” Mercer’s spokesman declined to comment about any connection with the company, and Rick Tyler, Cruz’s national spokesman, said he didn’t “know all the details of the ownership.”

‘All in,’ minus $500,000

Mercer has never achieved an entirely walled-off existence.

His political life brought a reminder of that last month, when federal election officials asked for clarification about the pro-Cruz PAC’s June payment to the pro-Fiorina group.

The president of the pro-Cruz PAC, Kellyanne Conway, said the group felt that Fiorina had “important things to say that weren’t being heard.” But, she added, “We are all in for Ted Cruz.” A spokeswoman for the Fiorina group declined to comment.

An earlier disruption came when a Senate committee found in 2014 that Renaissance Technologies’ use of complex financial structures known as “basket options” had allowed it to save billions by paying taxes at low rates. Then-Sen. Carl Levin (D-Mich.), who helped lead the inquiry, called the approach “a pretty stunning bit of phony and abusive tax machinations.”

The Internal Revenue Service this summer issued a new requirement that anyone who uses the strategy declare it on tax returns.

Renaissance Technologies recently reiterated its past statement that the practice was “appropriate under current law.”

Then there were the strange cases of the $2 million toy train set and the almost-empty shampoo bottles.

In 2009, Mercer sued a Florida-based company, RailDreams, and owner Richard Taylor, alleging that they overcharged him by $1,990,164 for a model railroad constructed in his home. Neither Mercer’s spokesman not Taylor would comment on the status of their disagreements.

And in 2013, domestic workers at Mercer’s Long Island home sued Mercer and Owl’s Nest, the company he created to hire household staff. In the lawsuit, which was later settled, the workers claimed that they were not paid for overtime and were given “demerits” of anywhere from $10 to $20 for alleged poor performance.

Troy Kessler, the lawyer who represented the employees, wrote in an e-mail, “Unfortunately, I cannot comment on the lawsuit except to say that ‘the matter has been resolved amicably to the satisfaction of all parties.’ ” Kessler also noted that the domestic workers are unable to comment on what it was like to work for the Mercers.

In the laundry list of alleged offenses for which the employees said their pay was docked — including failing to replace shampoos if there was less than one-third of a bottle remaining, failing to leave extra towels in the bathroom, failing to level pictures and improperly counting beverages — one stands out.

Failing to properly close doors.

Alice Crites and Anu Narayanswamy contributed to this report.