bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10763: 23.4; calc-embedded fails to simplify units in \frac


From: Jay Belanger
Subject: bug#10763: 23.4; calc-embedded fails to simplify units in \frac
Date: Wed, 08 Feb 2012 14:41:00 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

> Using calc-embedded in LaTeX:
>
> \documentclass[pdftex,a4paper]{report}
> $ a \gets 3 m $
> $ b \gets 4 m $
> $ \evalto \alpha \gets \arcsin\left( \frac{a}{b} \right) \to
> \arcsin\left( \frac{0.75 m}{m} \right) $
> \end{document}
>
> calc doesn't finish evaluating the expression, presumably because it
> has failed to simplify the units in the fraction.

By default, Calc doesn't cancel the common factors of the top and bottom
of a fraction unless they are the leading factors.  If you want Calc
to cancel any common factors, you can use algebraic simplification mode.
You can turn that on with "m A".  

So for the above file, you can open it and type "C-x * a" (to activate
all of the formulas), go to the evalto line and type "C-x * e" (to work
on the embedded formula), and then "m A" to put Calc in algebraic
simplification mode.  You will then get 
  $\evalto \alpha \gets \arcsin\left( \frac{a}{b} \right) \to 48.5903778907$
(if you are in degree mode and not in symbolic mode).
You can type "m A" to get out of algebraic simplification mode or "m m"
to save algebraic simplification mode (and any other modes you are
using) for future sessions.

Jay





reply via email to

[Prev in Thread] Current Thread [Next in Thread]