[sage-support] Re: New to sage: significant digits, etc.

2011-03-03 Thread sm123123
Replying to myself. Somehow a rerun on this worked (weird). However, the output is 7.099e-27, not 7.099 \times 10$^{-27}$. On Mar 3, 11:03 am, sm123123 wrote: > :) > > I tried the \percent macro. > > I got: > >   File "problemset.py", line 39 >     _st_.inline(_sage_const_1 , latex(''%_sage_const

[sage-support] Re: New to sage: significant digits, etc.

2011-03-03 Thread sm123123
:) I tried the \percent macro. I got: File "problemset.py", line 39 _st_.inline(_sage_const_1 , latex(''%_sage_const_12p 3e"%lnm1)) ^ SyntaxError: invalid token where lnm1 is a variable defined in a \begin{sagesilent} ... \end{sage

[sage-support] Re: New to sage: significant digits, etc.

2011-03-03 Thread sm123123
I got: File "problemset.py", line 39 _st_.inline(_sage_const_1 , latex(''%_sage_const_12p 3e"%lnm1)) ^ SyntaxError: invalid token where lnm1 is a variable defined in a \begin{sagesilent} ... \end{sagesilent} environment. On Mar 3,

Re: [sage-support] Re: New to sage: significant digits, etc.

2011-03-03 Thread Dan Drake
On Wed, 02 Mar 2011 at 07:34PM -0800, sm123123 wrote: > I tried using the format specs in SageTeX: > > \newcommand{\sagenum}[1]{\sage{''temp1=#1;%12.3e"%temp1}} > > This fails to compile as "%" is the comment character in LaTeX. > > If I escape it with a backslash (as is customary in LaTeX), Sag

[sage-support] Re: New to sage: significant digits, etc.

2011-03-02 Thread sm123123
Thanks for your detailed and helpful response. I tried using the format specs in SageTeX: \newcommand{\sagenum}[1]{\sage{''temp1=#1;%12.3e"%temp1}} This fails to compile as "%" is the comment character in LaTeX. If I escape it with a backslash (as is customary in LaTeX), Sage chokes on the code

[sage-support] Re: New to sage: significant digits, etc.

2011-03-02 Thread Jason Grout
On 3/2/11 12:04 PM, sm123123 wrote: Is there any way to handle scientific precision in base 10 in a simple way, using sage ? Yes. You could just use normal floating point numbers and then give the output format. This would use 53-bit precision for the calculations, but then the printing wo

[sage-support] Re: New to sage: significant digits, etc.

2011-03-02 Thread John H Palmieri
On Wednesday, March 2, 2011 10:04:39 AM UTC-8, sm123123 wrote: > > Is there any way to handle scientific precision in base 10 in a simple > way, using sage ? > > Alternatively, are there any libraries that will do something like > that ? > > Using \sage{RIF10(RR10(#1))} in a LaTeX document (#

[sage-support] Re: New to sage: significant digits, etc.

2011-03-02 Thread sm123123
Is there any way to handle scientific precision in base 10 in a simple way, using sage ? Alternatively, are there any libraries that will do something like that ? Using \sage{RIF10(RR10(#1))} in a LaTeX document (#1 is the argument) leaves numbers like 6.0421?e-27. Use of question marks like that

[sage-support] Re: New to sage: significant digits, etc.

2011-03-01 Thread sm123123
No. I use matlab extensively for data analysis and have a large library of code already written in matlab. I do not want to invest the time required in porting all that. On Mar 1, 12:16 pm, Maxim wrote: > I'm affraid I cannot help you on the Matlab front (I don't have it > installed), but have

[sage-support] Re: New to sage: significant digits, etc.

2011-03-01 Thread Maxim
I'm affraid I cannot help you on the Matlab front (I don't have it installed), but have you considered using pyplot (from matplotlib)? It's basically a clone of the Matlab plotting framework. I've used it recently to make a semilog plot with excellent results. On 1 mar, 12:57, sm123123 wrote: > S

Re: [sage-support] Re: New to sage: significant digits, etc.

2011-03-01 Thread David Kirkby
On 1 March 2011 17:57, sm123123 wrote: > Sigh. > > When I issue a plot() command using the Matlab interface, I get a > syntax error. I think the MATLAB interface might be an optional component. Check the docs Dave -- To post to this group, send email to sage-support@googlegroups.com To unsubsc

[sage-support] Re: New to sage: significant digits, etc.

2011-03-01 Thread sm123123
Sigh. When I issue a plot() command using the Matlab interface, I get a syntax error. On Mar 1, 5:43 am, Dan Drake wrote: > On Mon, 28 Feb 2011 at 11:32AM -0800, sm123123 wrote: > > It seems that I was unable to convey the issue at hand. For > > Mathematica, I can issue a Plot[] command, follow

Re: [sage-support] Re: New to sage: significant digits, etc.

2011-03-01 Thread Dan Drake
On Mon, 28 Feb 2011 at 11:32AM -0800, sm123123 wrote: > It seems that I was unable to convey the issue at hand. For > Mathematica, I can issue a Plot[] command, followed by an Export[] and > then use \includegraphics to use the generated plot (the its not good > enough section in the SageTeX manual

[sage-support] Re: New to sage: significant digits, etc.

2011-02-28 Thread Jason Grout
On 2/28/11 1:32 PM, sm123123 wrote: Thanks for your response. It seems that I was unable to convey the issue at hand. For Mathematica, I can issue a Plot[] command, followed by an Export[] and then use \includegraphics to use the generated plot (the its not good enough section in the SageTeX man

[sage-support] Re: New to sage: significant digits, etc.

2011-02-28 Thread sm123123
Thanks for your response. It seems that I was unable to convey the issue at hand. For Mathematica, I can issue a Plot[] command, followed by an Export[] and then use \includegraphics to use the generated plot (the its not good enough section in the SageTeX manual). I cannot do the same for matlab

[sage-support] Re: New to sage: significant digits, etc.

2011-02-28 Thread sm123123
Thanks. Looks needlessly complicated. I did see significant errors crop up when I tried use .n(4) etc. So, your warning is pretty wise. Is there a way to extract the mantissa from a number (in base 10 - I do know that sign_mantissa_exponent() does it in base 2, which is not terribly useful). Alt

[sage-support] Re: New to sage: significant digits, etc.

2011-02-28 Thread Volker Braun
On Sunday, February 27, 2011 8:59:25 PM UTC, sm123123 wrote: > > I have numerical calculations that need to adhere to significant > digits of the input. Sage has at least three different "real" numbers, see http://www.sagemath.org/doc/reference/rings_numerical.html Each implementation is a dif