A railroad company operating a railroad lying wholly within this state or lying partly in this state and partly in another state shall be taxed as to the rolling stock of the company and other personal property appurtenant to the rolling stock, which is not permanently located in any of the states through which the railroad passes, on as much of the whole value of the rolling stock and personal property as the length of the railroad in this state bears to the whole length of the railroad, without regard to the location of the head office of the railroad company.