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), Sage chokes

[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,

[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} ...

[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

[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.

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-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 dr...@kaist.edu 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[]

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

2011-03-01 Thread David Kirkby
On 1 March 2011 17:57, sm123123 singh.madhusu...@gmail.com 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] 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

[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 maxim.courno...@gmail.com wrote: I'm affraid I cannot help you on the Matlab front (I don't have

[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

[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 number.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

[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

[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