I played around with it and got a solution.
There is an STRCALCUNIT function that formats a length with the work environment calculation units.
The result of TAN has to be converted from a number to a length: 1 ft * TAN( {Property:Roof/Pitch} )
STRCALCUNIT ( 1 ft * TAN ( {Property:Roof/Pitch} ) ) will give the number you need.
CONCAT ( STRCALCUNIT ( 1 ft * TAN ( {Property:Roof/Pitch} ) ); "/12\"" ) is the concatenated expression, \" is needed to write an " inside a string. It renders a different character on the UI, but works.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest