0

My question concerns more the Maths field rather then the LaTeX one ...
in fact it's about writing mathematical equations correctly.
I was looking for a way to be able to write a fraction nested in another fraction (at the numerator) in a larger font size.

I came across this question and asked myself: is this correct in mathematical terms?
I should premise that I'm not a Math student, so I'm not that familiar with certain formalisms.

But let's take the following MWE

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
    \[ 
        \frac{\lvert \, x - fl^t(x) \, \rvert}{\lvert \, x \, \rvert} \, \le \, \frac{\cfrac{b^{p-t}}{2}}{b^{p-1}} 
        \,=\, \frac{b^{p-t+1-p}}{2} \,=\, \frac{b^{1-t}}{2} \,=\, \varepsilon_M
    \]
\end{document}

If I had to choose according to my 'personal taste', I would say that I prefer this first version over the following one.

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
    \[ 
        \frac{\lvert \, x - fl^t(x) \, \rvert}{\lvert \, x \, \rvert} \, \le \, \frac{\frac{b^{p-t}}{2}}{b^{p-1}} 
        \,=\, \frac{b^{p-t+1-p}}{2} \,=\, \frac{b^{1-t}}{2} \,=\, \varepsilon_M
    \]
\end{document}

And their respective outputs are these:
enter image description here
enter image description here
But is this correct?
Thanks in advance!

0

1 Answer 1

1

Nesting \cfrac inside \frac doesn't make suitable sizes at all, If you really have to nest I would use \frac here but I'd avoid nesting if possible.

enter image description here

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}

eek (cfrac)
    \[ 
        \frac{\lvert  x - fl^t(x)  \rvert}{\lvert  x  \rvert}  \le  \frac{\cfrac{b^{p-t}}{2}}{b^{p-1}} 
        = \frac{b^{p-t+1-p}}{2} = \frac{b^{1-t}}{2} = \varepsilon_M
    \]

 (frac)
    \[ 
        \frac{\lvert  x - fl^t(x)  \rvert}{\lvert  x  \rvert}  \le  \frac{\frac{b^{p-t}}{2}}{b^{p-1}} 
        = \frac{b^{p-t+1-p}}{2} = \frac{b^{1-t}}{2} = \varepsilon_M
    \]
 
(rearranged)
    \[ 
        \frac{\lvert  x - fl^t(x)  \rvert}{\lvert  x  \rvert}  \le \frac{b^{p-t}}{2b^{p-1}} 
        = \frac{b^{p-t+1-p}}{2} = \frac{b^{1-t}}{2} = \varepsilon_M
    \]
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .