President Reagan signed a $6.4 billion supplemental spending bill yesterday that he said "is a prime example of how not to legislate on budgetary matters."

The appropriations bill provides money to keep the Commodity Credit Corp. afloat and allow farmers to apply for new loans, but it also contains $1.7 billion in various domestic programs Reagan did not request.

The bill originally contained restrictions on U.S. testing and deployment of nuclear weapons and would have required mandatory compliance with the unratified SALT II treaty. Reagan said he would have vetoed the legislation had a conference committee not removed those provisions.

The bill also provides $75 million for the Strategic Defense Initiative, $425 million less than Reagan requested; $355 million in aid to the homeless, and $78.5 million for the fight against AIDS.

In a statement, Reagan said, "H.R. 1827 is a prime example of how not to legislate on budgetary matters. As has been the case with other omnibus appropriations bills that have been presented for my signature, H.R. 1827 presented a choice between many expensive, undesirable and unnecessary provisions on the one hand or a shutdown of important government programs on the other."

He said to avoid a "critical disruption" in the farm-loan program, "I must sign away $1.7 billion in unrequested funding for other entirely unrelated programs."