A soft magnetic film is formed of a CoFeNi alloy containing trace amounts
of chlorine and sulfur as impurities. The stress of the soft magnetic
film can be reduced effectively, specifically to 1,200 MPa or less, by
adjusting the concentration ratio of chlorine to sulfur within the range
from 1 to 60. In addition, variations in film stress can be reduced to
provide higher yields of CoFeNi alloy films with low stresses.