The Senate Environment and Public Works Committee yesterday approved and sent to the floor a bill to renew the Clean Water Act, but only after an hour-long exercise in higher mathematics over a funding formula.

The effort left some members befuddled and two senators steaming over a "pernicious" display of politics that will cost 19 larger states more than $200 million in federal dollars for sewage treatment plants.

The issue was a change in the formula the government uses to decide which state gets how much of the $2.4 billion earmarked for building the plants.

As a practical matter, the way that pie is sliced has always been the subject of keen interest in Congress. But the formula has taken on additional significance this year in light of the Reagan administration's efforts to phase out the grant program in the next four years.

So eyebrows shot up when the committee staff unveiled a new formula -- a complicated hash of tiers and logarithms -- that was designed to "moderate differences in need" among the states. On the bottom line, the new formula would strip $261 million from 19 larger states and give it to their smaller brethren.

"I don't know what the Founding Fathers would have to say about the logarithms of sewage needs cubed, but I don't think they would be surprised to see Rhode Island, Connecticut and Maine ganging up on New York," said Sen. David F. Durenberger (R-Minn.), who complained that Great Lakes states stand to lose $156 million under the new formula.

Staff aides plodded through explanations of percentages based on "the proportion of the cube of the logarithm (base 10) of fully eligible needs to the sum of the cubed logarithms of fully eligible needs," but to no avail. Durenberger and Sen. Daniel Patrick Moynihan (D-N.Y.) remained convinced that the new formula contained more politics than Pythagoras.

"I don't think there's a lot of mystery to what's happening here," said Durenberger, who noted that of the states standing to gain most from the formula change, 12 are represented on the 15-member committee. "Why can't we have a logarithm?" Moynihan chimed in.

Durenberger and Moynihan lost two attempts to change the formula, arguing that it would undercut an international agreement with Canada over water quality in the Great Lakes.

Maryland, Virginia and Pennsylvania senators, whose states would lose $42 million, also have protested the change as a threat to cleanup efforts for the Chesapeake Bay.

But the formula had its defenders, including Sen. Lloyd Bentsen (D-Tex.), who noted that the Great Lakes already had received $351 per capita in sewage treatment grants, compared with $99 per capita in Texas.

"You folks have been doing very well, but we'd like to have a little more balance in the program," said Bentsen, whose state, while large, would gain under the new formula.

The bill, logarithms and all, passed by a vote of 13 to 2, and committee Chairman Robert T. Stafford (R-Vt.) went on to other business.