Hi again,

I have looked into my problem further, and it seems that the latex
command is at fault. As you see, only when I multiply the fraction by
-2 (or anything other than -1), do I get a negative fraction back from
the latex command.

Any ideas? Bug report? SAGE seems a very useful tool but if there are
problems like this lurking in the depths it is not yet safe for use.

sage: var('a,b')
(a, b)
sage: latex(-a/sqrt(b))
\frac{a}{\sqrt{b}}
sage: latex(-1*a/sqrt(b))
\frac{a}{\sqrt{b}}
sage: latex(-2*a/sqrt(b))
\frac{-2 \, a}{\sqrt{b}}



On Jul 8, 4:41 pm, Ra Cleave <[email protected]> wrote:
> Hi,
>
> I am new to SAGE, and would like some help with an error I have when using 
> sagetex. When I paste commands from my latex source at the SAGE prompt, I get 
> the correct results. When I use sagetex I get something different.
>
> The output from the SAGE prompt is copied below, and the PDF output from 
> sagetex is attached (hope it is ok to attach PDFs). The signs in F2 are 
> different. I have checked the .sage file that is generated, and it looks 
> correct.
>
> My question is: What am I doing wrong??
>
> Thanks in advance,
> Ra
>
> ----------------------------------------------------------------------
> | Sage Version 4.4.4, Release Date: 2010-06-23                       |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> sage:   var('v,B_s,H_C')
> (v, B_s, H_C)
> sage:   var('Q_R')
> Q_R
> sage:   Q = v*Q_R
> sage:   H = H_C-B_s*Q
> sage:   n_1 = 1/(v*sqrt(H))
> sage:   q_1 = 1/sqrt(H)
> sage:   var('agv,A_0,A_1,A_2')
> (agv, A_0, A_1, A_2)
> sage:   F1 = -n_1-agv-q_1
> sage:   F2 = -A_1*n_1-agv-A_2*q_1
> sage: F1
> -agv - 1/sqrt(-B_s*Q_R*v + H_C) - 1/(sqrt(-B_s*Q_R*v + H_C)*v)
> sage: F2
> -agv - A_2/sqrt(-B_s*Q_R*v + H_C) - A_1/(sqrt(-B_s*Q_R*v + H_C)*v)
> sage:
>
>  SageError.pdf
> 98KViewDownload

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to