I've noticed that e-style (for example, 1.5e-10) scientific notation does not look especially nice in Latex math mode:
(code used to generate the above image: $1.5e-10$
)
In particular, the width and kerning of the negative sign is totally off. Is there any way to specifically fix the issues with the negative sign?
My LaTeX code:
Here's the complete code, including packages, for the above image:
\documentclass[11pt,notitlepage]{article}
\usepackage{amsfonts, amsmath, amsthm, amssymb}
\begin{document}
$1.5e-10$
\end{document}
I've also run into the exact same kerning issues with MathJax (via the markdown editor in IPython Notebook. Notebook sets MathJax up automatically, so no idea what packages they use).
Context: floating point numbers and numerical programming
For context, when I originally asked this question I was writing a tutorial about the mathematics of stochastic simulation, with the goal of teaching people how to implement their own simulations in Python. This particular notation (<significand>e[<sign>]<exponent>
) is relevant since it's how you write a floating point literal (ie a symbol that the Python interpreter understands as representing a particular floating point number). The <signficand>*<base>^<exponent>
notation and its prettier variants are less appropriate, since Python (and many other languages) don't recognize it.
1.5e-10
is the way to present this number to the computer/calculator. In which case, it would appear in a monospaced font (not math mode), where the supposed kerning problems do not appear.listings
package, though it's overkill just for a single example.