Japanese investigators have uncovered another illegal sale of sophisticated machine tools by Toshiba Corp. to the Soviet Union, worsening what intelligence and Pentagon officials consider one of the most damaging diversions of high technology to the Soviet military in decades.

The machines will not only allow Moscow to make its submarines quieter and harder to detect, but also to improve the maneuverability of its new aircraft carriers, a leading Japanese newspaper reported yesterday.

The newly reported sale of four giant milling machines reportedly gives the Soviet Union eight of the computer-controlled devices, which the Soviets had been unable to develop on their own.

The original sale by Toshiba Machine Co. and a state-owned Norwegian arms company, Konsberg Vaapenfabrikk, along with the latest one involving only Toshiba have seriously weakened the United States' ability to detect movements of Soviet submarines, Pentagon officials said.

The eight machines will allow Soviet shipyards to fine-tune the propellers of warships, Pentagon officials said.

This will make Russian aircraft carriers faster and more maneuverable and will eliminate the loud propeller sounds from Soviet submarines that are a keystone of U.S. detection efforts.

Until now, Soviet technology has not been able to craft propellers to allow its submarines to move quietly, and the noise they make has made it easy for the United States to track their movements.

Pentagon officials fear that advantage has now been greatly compromised, requiring a complete rethinking of U.S. antisubmarine warfare. Capitol Hill sources said the cost of modifying U.S. detection equipment to pick up the quieter Soviet submarines could run to more than $10 billion.

The milling machines, which cost between $4 million and $5 million each, came from Toshiba, while Konsberg supplied the $2 million computer that controls them.

Norwegian State Prosecutor Tor-Aksel Busch told the Reuter news service that investigations are under way to see if Konsberg made additional illegal sales to the Soviets.

The disclosures in yesterday's editions of the Mainichi Shimbun in Tokyo, moreover, prompted renewed outbursts from Congress.

"What we have here is a pattern of betrayal of the free world," thundered Sen. Jesse Helms (R-N.C.) in a Senate speech yesterday. "This is a very serious matter affecting the strategic balance between the United States and the Soviet Union. Toshiba and Konsberg have put every Japanese citizen, every American citizen and every other free world citizen at peril."

Key lawmakers -- including Sens. Jake Garn (R-Utah), John Heinz (R-Pa.) and Richard C. Shelby (D-Ala.) -- have threatened to include a ban on U.S. sales by Toshiba in a trade bill coming before the Senate next week.

Toshiba Corp. of Japan, which owns more than 50 percent of Toshiba Machine, makes computers and other electronics products.

The vice president of Toshiba America Inc. told The Associated Press that it would not be fair to punish the parent company for the transgressions of a subsidiary.

"Toshiba Machine is just a subsidiary of Toshiba Corp. It is quite different from Toshiba Corp. It is quite independent," said Takao Hayashida.

Nine executives of Toshiba Machine have been arrested or indicted in Japan in connection with the sales for violating export control laws, and preliminary charges have been filed against one Konsberg employe.

Word of the latest sale, in 1984, was part of confessions to Japanese police by Toshiba officials.

But intelligence sources here said the confessions came a few days after the Japanese statute of limitations was up, assuring that the Toshiba executives would not face prosecution for that sale.

The other sale came earlier, in 1982 and 1983, but Japanese officials were able to prosecute the Toshiba executives because they followed up the original deal with more recent sales of software to operate the equipment, sources here said.