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

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

2011-03-03 Thread sm123123
egin{sagesilent} ... \end{sagesilent} environment. On Mar 3, 3:19 am, Dan Drake wrote: > 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}} > >

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

2011-03-03 Thread sm123123
} environment. On Mar 3, 3:19 am, Dan Drake wrote: > 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

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

2011-03-02 Thread sm123123
aTeX), Sage chokes on the code. Catch 22. On Mar 2, 3:54 pm, Jason Grout wrote: > 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 a

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

2011-03-02 Thread sm123123
d in itself. I have nothing against mathematicians (btw). On Mar 1, 3:23 pm, sm123123 wrote: > 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. >

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

2011-03-01 Thread sm123123
alled), 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: > > > > > Sigh. > > &g

[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

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

2011-02-28 Thread sm123123
matlab. Sage does have a matlab interface which (presumably) can accept textual commands. On Feb 28, 12:13 am, Dan Drake wrote: > I'll skip your first question for the moment, since I'm not sure about > the answer there. > > On Sun, 27 Feb 2011 at 12:59PM -0800, sm123123 wrot

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

2011-02-28 Thread sm123123
). Alternatively, is there support for printf formats (C) ? On Feb 28, 4:46 am, Volker Braun wrote: > 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 lea

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

2011-02-27 Thread sm123123
I am new to sage and trying to use it as a part of SageTeX. I have numerical calculations that need to adhere to significant digits of the input. I have tried to use round(x,n) to get n significant digits. However, this method fails miserably for very small numbers (think 1.67e-17, which returns z