# \sqrt(2) in TikZ results in illegal unit of measure [closed]

The code snippet below works well on my Mac but under Linux I get the error messages

"! Illegal unit of measure (pt inserted)."
"! Missing number, treated as zero."
! Package calc Error: s' invalid at this point."

for line 3 of the example.

\begin{tikzpicture}[thick,scale=0.9]
\draw (0, 0) -- (0, -4); %works
\draw ({3.5 / sqrt(2)}, {3.5 / sqrt(2)}) -- ({4 / sqrt(2)},{4 / sqrt(2)});
\end{tikzpicture}


Does anybody know what the problem could be?

-

## closed as too localized by Loop Space, percusse, Stefan Kottwitz♦Jun 29 '12 at 8:25

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

Try putting the braces around the whole formula to protect the parentheses: ({4/sqrt(2)},{4/sqrt(2)})`. –  Loop Space Jun 11 '12 at 8:49
Which TeX distributions do use use on the mac and Linux machines, resp.? –  Mico Jun 11 '12 at 8:51
@Andrew Stacey Thank you but changing the brackets (as shown now in the original post) did not solve the problem –  user695652 Jun 11 '12 at 9:01
In which case, the answers to Mico's comment are extremely important as on my Linux machine it compiles with no difficulties. But I'm using the latest TeXLive so that might be significant. –  Loop Space Jun 11 '12 at 9:05
It also work fine with MiKTeX 2.9 / PGF 2.10 –  Tom Bombadil Jun 11 '12 at 12:46