It is simply due to a forgotten square root step. It can be solved by adding sqrt
.
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=3]
\node[left] (O) at (0,0) {$O$};
%Draw the Circle around it all
\draw[semithick] (0,0) circle (1);
%Draw lines to the top
\foreach \x in {-4,...,4}
\draw[red,very thick] (\x/8,0) -- +(0,{sqrt(1-\x/8*\x/8)});
\end{tikzpicture}
\end{document}
It's not ugly, but exactly what's expected. If you type
$2x-10$
then you expect that there is some space around the minus sign, because it denotes an operation. When you type $1e-10$
, TeX interprets it in exactly the same way, because it can't read your mind: the two expressions are formally the same, only two symbols are different.
If you want that an expression that's normally interpreted as a polynomial should be treated in a different way, then you have to properly mark it.
One solution might be
$1\mathrm{e}{-10}$
because in this case the braces around -10
tell TeX to enter a subformula and so the minus sign is initial, so not interpreted as a binary operation, but as a unary operator.
You could make a definition, such as
\newcommand{\expnumber}[2]{{#1}\mathrm{e}{#2}}
and input the number as
$\expnumber{1}{-10}$
but there's a much better alternative, the package siunitx
.
\documentclass{article}
\usepackage{siunitx}
\sisetup{output-exponent-marker=\ensuremath{\mathrm{e}}}
\begin{document}
\num{1e-10}
\end{document}
This package offers many more features than just printing numbers in the desired format; consult its documentation to find them.
Note that siunitx
is not understood by MathJax, so with it you must stick to the “hand made” solution. You can still say, in it,
$\def\num#1{\numx#1}\def\numx#1e#2{{#1}\mathrm{e}{#2}}$
and a formula such as $\num{1e-10}$
will be printed in the way you want.
Best Answer
This is another solution: