A number (with TiKZ):

@Code \pgfmathparse{pi/4} \let\t\pgfmathresult; @Code \pgfmathparse{2*(1-cos(\t))} \let\ft\pgfmathresult;