One of the reasons why I really like TikZ is because of its parser. It parses the coordinates automatically. All you need to do is
The only thing you have to watch out for are things like the brackets, which you have to put in a braces, i.e.
\path[draw](0,0)--(floor(\textwidth/2),0); will give an error because TikZ does not know which brackets delimit the coordinates. Another thing you may want to consider is that TikZ will convert these units to points. So
floor may or may not give you what you want. However, you can always convert things to the units you want to work in, e.g.