Ask Your Question

Daniel Friedan's profile - activity

2018-04-03 14:09:12 -0500 received badge  Famous Question (source)
2016-06-23 14:12:53 -0500 received badge  Notable Question (source)
2015-10-15 15:37:25 -0500 received badge  Famous Question (source)
2015-10-15 15:37:25 -0500 received badge  Notable Question (source)
2015-10-15 15:37:25 -0500 received badge  Popular Question (source)
2014-06-16 03:00:59 -0500 received badge  Popular Question (source)
2013-02-11 06:06:48 -0500 asked a question quitting sage.app leaves processes running

Using sage.app under Mac OS X 10.6.8 sage-5.6-OSX-64bit-10.6-x86_64-Darwin-app.dmg when I quit sage.app (choosing 'Quit Sage' from the 'Sage' menu), several processes continue to run (see below for 'ps x' output).

Is this normal? Could I have messed up my Sage installation? I've been installing CPLEX and Gurobi lately. I've run 'sage -b' several times.

thanks, Daniel

after quitting sage.app: $ ps x | grep sage 5758 ?? Ss 0:00.02 /bin/bash /Applications/Sage.app/Contents/Resources/start-sage.sh /Applications/Sage.app/Contents/Resources/sage/sage /Users/daniel/Library/Logs/sage.log 5761 ?? Ss 0:00.81 /bin/bash /Applications/Sage.app/Contents/Resources/sage-is-running-on-port.sh --wait 5827 ?? S 0:00.00 bash ./sage --notebook 5829 ?? S 0:00.01 bash /Applications/Sage.app/Contents/Resources/sage/spkg/bin/sage --notebook 5834 ?? S 0:01.92 python /Applications/Sage.app/Contents/Resources/sage/local/bin/sage-notebook 5849 ?? S 0:04.64 python /Applications/Sage.app/Contents/Resources/sage/local/bin/twistd --pidfile=sage_notebook.sagenb/sagenb.pid -ny sage_notebook.sagenb/twistedconf.tac 6796 ?? Ss 0:00.15 /bin/bash /Applications/Sage.app/Contents/Resources/sage-is-running-on-port.sh --wait 7323 s000 S+ 0:00.00 grep sage

2013-02-03 11:15:35 -0500 received badge  Nice Question (source)
2012-07-30 05:01:02 -0500 commented answer where to put a public worksheet referenced in a paper?

Thanks for the advice. I'll attach the .sws file to the arxiv submission. It's too specialized for interact.sagemath.org.

2012-07-29 12:48:16 -0500 asked a question where to put a public worksheet referenced in a paper?

I'll be publishing a paper that depends on calculations in a Sage worksheet. What is the standard practice for publishing such a worksheet? I'll attach in to the arXiv submission a printout of the worksheet and a .sobj file containing the worksheet. I'd also like to make the worksheet available to readers who do not have Sage installations of their own. I could say: 'get an account at sagenb.org and upload the worksheet', but that seems a bit awkward. I can't simply publish the worksheet from our local Sage installation because I need (in other worksheets) our Sage installation to allow running shell scripts from a Sage worksheet, which would be a bad security hole in a published worksheet.

2012-07-27 15:12:08 -0500 commented answer adding real literal and real number of high precision

Thank you very much for the explanations and for the pointers to the documentation. I gather that Sage's interpretation of a token such as '0.7' is context dependent. In RF(0.3+0.4), '0.3' and '0.4' are elements of RDF, and 0.3+0.4=0.7 in RDF, so RF(0.3+0.4)=RF(RDF(0.7)). But in RF(0.7), '0.7' is not an element of RDF, so RF(0.3+0.4) \ne RF(0.7). In order to avoid worrying about this context dependence, I can use 'RealNumber = RF' whenever I need to do high precision calculations where an accidental invocation of RDF would be disastrous. I'll be careful to do this in the future. I must say I find this behavior of Sage to be somewhat peculiar. I assumed that an expression of the form RF ... (more)

2012-07-27 10:34:13 -0500 commented question adding real literal and real number of high precision

But RF(RDF(0.3))= 0.29999999999999998889776975374843459576368332 and RF(RDF(0.7))= 0.69999999999999995559107901499373838305473328 so how can RF(0.3+0.7)= 1.0000000000000000000000000000000000000000000 if the addition is being done in double precision?

2012-07-27 08:07:08 -0500 commented question adding real literal and real number of high precision

There seem to be inconsistencies: RF(.5 + .4 ) 0.90000000000000002220446049250313080847263336 RF(.3+.7) 1.0000000000000000000000000000000000000000000 If .4 and .5 are added as double precision, why not .3 and .7 ?

2012-07-27 06:14:18 -0500 received badge  Editor (source)
2012-07-27 06:05:52 -0500 asked a question adding real literal and real number of high precision

When Sage is adding a real literal to a real number of high precision, shouldn't it calculate the sum in the high precision ring? Instead, Sage seems to calculate in double precision:

RF=RealField(150); RF

Real Field with 150 bits of precision

RF(0.9 + RF(1e-18))

0.90000000000000002220446049250313080847263336

RF(1.0+ RF(1e-18))

1.0000000000000000000000000000000000000000000

RF(1+ RF(1e-18))

1.0000000000000000010000000000000000000000000

I'm trying to use high precision arithmetic (2658 bits) in Sage to verify some results produced by the high precision semidefinite program solver sdpa_gmp. Sage's treatment of real literals in these calculations has made me anxious about the possibility that I'm overlooking other ways in which the calculations might be unreliable.

Is there anywhere an explanation of Sage's treatment of real literals in high precision arithmetic?

Added: Immediately after posting this question, the list of Related Questions in the sidebar pointed me to question/327/set-global-precision-for-reals where I learned that 'RealNumber = RF' would make all real literals lie in the high precision ring. Still, I wonder why the default behavior is to discard precision that is present in the original real literal.

thanks, Daniel Friedan

thanks for

2012-04-06 09:06:59 -0500 commented question polynomials of derivative operator

Here's an example. Let p(y)=y^2. Then p(d/dx + x^2) = (d/dx)^2 + 2 x^2 d/dx + 2 x + x^4. Acting on 1, this operator gives 2 x + x^4.

2012-04-06 08:57:36 -0500 commented answer polynomials of derivative operator

please see my comment in response to jdc above

2012-04-06 08:56:47 -0500 commented question polynomials of derivative operator

Sorry I wasn't clear. Try a simpler example. p is a polynomial in 1 variable. p(d/dx + x^2) is a differential operator. p(d/dx + x^2) 1 is that operator acting on the constant function. The result is a polynomial in x. I'd like to calculate that polynomial in Sage. I have a workaround, using Fourier transforms, that Sage can do via Macsyma, but I suspect an algebraic method would scale better.

2012-04-05 06:27:24 -0500 commented answer polynomials of derivative operator

Thanks, but I don't think your proposed answer does what I asked. Here's a simpler version: (d/dx + a x)^2 1 = a + a^2 x^2 Your code sage: var('a y') (a, y) sage: F = function('F',x) sage: G = F.derivative(x) sage: G D[0](F)(x) sage: exp = G + a*x sage: p(h) = h^2 sage: p(exp) (a*x + D[0](F)(x))^2

2012-04-05 05:49:10 -0500 received badge  Student (source)
2012-04-04 16:32:12 -0500 asked a question polynomials of derivative operator

Is there any way in Sage to evaluate expressions such as p(x^2d/dx + a + x - x^2y) 1 where p() is a polynomial in one variable? The result would be a polynomial in a,x, and y.

Alternatively, can Sage evaluate (1/f) p(d/dx) f where f is a (non-polynomial) function of x and a and y?

Thanks very much.