[sage-support] Re: SageMath 8.5 Crash Report
Same crash - with kernel panic reported - at end of process of process of verifying when opening sage-8.5-OSX_10.14.2-x86_64.app under macOS 10.14.2. Tried downloads from both UW and MIT, with same result. I've never seen this happen before, even when opening/verifying MUCH larger dmg's (e.g., for Mathematica). On Saturday, December 29, 2018 at 2:04:39 PM UTC-5, ahaus...@umassd.edu wrote: > > Hi, > > > I have attempted to install SageMath 8.5 on a 15" 3.1 GHz Intel Core i7 > 16GB 2017 MacBook Pro running Mac OS 10.14.2 > > > >1. First the App version via DMG. This caused my MacBook Pro >to restart while attempting to open the .DMG >2. Second via the Terminal version via .tar.bz2. This generated >the arched crash log when attempting to launch via the Terminal > > > > Regards, > > > Adam Hausknecht > > > Prof. Adam O. Hausknecht > > Department of Mathematics > > UMass Dartmouth > > 285 Old Westport Road, North Dartmouth 02747 > > ahaus...@umassd.edu > > 508-999-8322 > > LARTS 394B > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: taylor versus series
Hi Peter, On 2018-12-30, Nils Bruin wrote: >> Does this only work in interactive mode? As soon as I try to >> capture it in a function it doesn't work anymore. The syntax R. = QQ[[]] only works interactively. In an interactive session, a preparser is adding some syntactical sugar: sage: preparse('R. = QQ[[]]') "R = QQ[['t']]; (t,) = R._first_ngens(1)" If you want to write a module for Sage, you have to translate it into Python syntax. One possibility is to copy the above result of the preparser. Another possibility is from sage.rings.power_series_ring import PowerSeriesRing R = PowerSeriesRing(QQ, 't') t = R.gen() Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: taylor versus series
Hi Nils, On 2018-12-30, Nils Bruin wrote: > In the mean time, you can accomplish your computations without using SR: > > sage: R.=QQ[[]] > sage: (1 - x - sqrt(1 - 6*x + x^2))/(2*x) > 1 + 2*x + 6*x^2 + 22*x^3 + 90*x^4 + 394*x^5 + 1806*x^6 + 8558*x^7 + > 41586*x^8 + 206098*x^9 + 1037718*x^10 + 5293446*x^11 + 27297738*x^12 + > 142078746*x^13 + 745387038*x^14 + 3937603038*x^15 + 20927156706*x^16 + > 111818026018*x^17 + 600318853926*x^18 + O(x^19) > > which is probably why the state of "series" is so abysmal: people don't use > it. Interesting. I often tell people to only use symbolic expressions when it is really needed --- and I thought that in this particular case the usage of symbolic expressions is appropriate. But you showed that again using a more specialised tool is better. Cheers, Simon -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: taylor versus series
On Sunday, December 30, 2018 at 10:30:53 AM UTC-8, Peter Luschny wrote: > > > In the mean time, you can accomplish your computations without using SR: > > sage: R.=QQ[[]] > > sage: (1 - x - sqrt(1 - 6*x + x^2))/(2*x) > > 1 + 2*x + 6*x^2 + 22*x^3 + 90*x^4 + 394*x^5 + ... > > Does this only work in interactive mode? As soon as I try to > capture it in a function it doesn't work anymore. > > Given sage: var('x') sage: f=sqrt(1+x) sage: R.=QQ[[]] you'd hope that f(x=t) would do the trick, but unfortunately that tries to put t into SR rather than try to evaluate it in R. A workaround: sage: F=fast_callable(f,vars=[x]) sage: f_as_power_series = F(t) It depends a bit on how you want to give f to begin with. If you want to start with an expression in SR then the approach is fairly efficient. If you know you'll be working in Q[[t]] anyway, you might as well start with creating f in that ring. > def SERIES(s): > R. = QQ[[]] > return s > By definining R., you don't change s, so you just get the object s back that you passed in. What people use depends on their background: I guess that someone > who comes from Maple or Mathematica almost automatically writes > 'series' and thinks in terms of SR. > Indeed. What I meant was, given that "series" is so poor in sage presently, people cannot be using it. So apparently, people who use series in sage do so via other means. Indeed, the algebra of series is fairly well-supported via power series rings. It would be great if the pynac series would be better supported in sage (and if not, we should probably remove them entirely, because your example shows they are very misleading), but then one has to think: who's going to do the work and why hasn't it happened yet? Apparently, people have been sufficiently happy with the other means. That said, checking if a ticket exists and, if not, filing one would be good. Perhaps someone likes to work on it (you?). -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: taylor versus series
> In the mean time, you can accomplish your computations without using SR: > sage: R.=QQ[[]] > sage: (1 - x - sqrt(1 - 6*x + x^2))/(2*x) > 1 + 2*x + 6*x^2 + 22*x^3 + 90*x^4 + 394*x^5 + ... Does this only work in interactive mode? As soon as I try to capture it in a function it doesn't work anymore. def SERIES(s): R. = QQ[[]] return s SERIES(LargeSchroeder) -1/2*(x + sqrt(x^2 - 6*x + 1) - 1)/x How do I have to write such a wrapper? Using QQ[[]] is OK for me, no generality intended. > which is probably why the state of "series" is so abysmal: > people don't use it. What people use depends on their background: I guess that someone who comes from Maple or Mathematica almost automatically writes 'series' and thinks in terms of SR. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: taylor versus series
Looking at the implementation, it seems that the ".series" method uses Pynac/Ginac series. A little experimentation seems to suggest that this is not properly wrapped. If we break up the expression in small parts and see how series expansions of the different components combine, we get inconsistent results: sage: A=(1-x).series(x,6) sage: B=sqrt(1-6*x+x^2).series(x,6) sage: C=(2*x).series(x,6) This seems correct: sage: A,B (1 + (-1)*x + Order(x^6), 1 + (-3)*x + (-4)*x^2 + (-12)*x^3 + (-44)*x^4 + (-180)*x^5 + Order(x^6)) This seems correct too: sage: A.truncate()-B.truncate() 180*x^5 + 44*x^4 + 12*x^3 + 4*x^2 + 2*x This is a mess: sage: (A-B).truncate() -(1 + (-3)*x + (-4)*x^2 + (-12)*x^3 + (-44)*x^4 + (-180)*x^5 + Order(x^6)) + (1 + (-1)*x + Order(x^6)) This seems fine again: sage: (A-B).series(x,6) 2*x + 4*x^2 + 12*x^3 + 44*x^4 + 180*x^5 + Order(x^6) And this seems to be a way of getting a correct answer out (if a little lossy): sage: ((A-B)/C).series(x,6) 1 + 2*x + 6*x^2 + 22*x^3 + Order(x^4) so it seems that the series code goes haywire when removing the pole. It looks like an "upstream" bug in Pynac (and possibly Ginac). There are other problems with "series" objects:. They don't round-trip to maxima very well: sage: (1/(1-x)).series(x,10).simplify() ValueError: The name "1" is not a valid Python identifier. so it looks like either "series" needs a lot of love and support in SR, or needs to be pulled. Either one needs significant work from a sufficiently expert programmer. In the mean time, you can accomplish your computations without using SR: sage: R.=QQ[[]] sage: (1 - x - sqrt(1 - 6*x + x^2))/(2*x) 1 + 2*x + 6*x^2 + 22*x^3 + 90*x^4 + 394*x^5 + 1806*x^6 + 8558*x^7 + 41586*x^8 + 206098*x^9 + 1037718*x^10 + 5293446*x^11 + 27297738*x^12 + 142078746*x^13 + 745387038*x^14 + 3937603038*x^15 + 20927156706*x^16 + 111818026018*x^17 + 600318853926*x^18 + O(x^19) which is probably why the state of "series" is so abysmal: people don't use it. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: taylor versus series
Thank you Simon for your detailed explanations. I'm pretty sure it's a bug. Sage doesn't like little Schroeder either. LittleSchroeder = (1 + x - sqrt(1 - 6*x + x^2))/(4*x) -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: taylor versus series
PS: On 2018-12-30, Simon King wrote: > It surprises me that .series(x,6) has a pole (after all, LargeSchroeder's > discontinuity in x=0 seems removable), so perhaps it's a bug, but > perhaps it's a feature after all --- I cannot tell from the documentation > if it is intended or not. Here is another reason why I think it's a bug: The residue of LargeSchroeder at x=0 is supposed to be the coefficient of x^(-1) in its Laurent series expansion. However, sage: LargeSchroeder.residue(x==0) 0 sage: LargeSchroeder.series(x,6).coefficient(x^-1) -1/2 Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: taylor versus series
Hi Peter, On 2018-12-30, Peter Luschny wrote: > With Sage 8.4: > LargeSchroeder = SR((1 - x - sqrt(1 - 6*x + x^2))/(2*x)) Putting "SR" around the expression probably isn't needed, as by default x is a symbolic variable (of course this doesn't hold if you have defined x to be something else). > print(LargeSchroeder.taylor(x, 0, 6).list()) > print(LargeSchroeder.series(x, 6).list()) Why "print" (assuming that you are in an interactive session)? > Bug or feature? Moreover > > taylor? .. gives hints > series? .. Object `series` not found. It seems that you are confusing functions and methods. If you do LargeSchroeder.taylor? and LargeSchroeder.series?, you'll see documentation of both. Explanation: In addition to "taylor" being a method of symbolic expressions, it also is a function defined in Sage's global name space; this is not the case for "series", that's why "series?" doesn't give you an answer. Now for the differences of both methods: Unfortunately, the documentation of LargeSchroeder.series? isn't very clear. Apparently .taylor(x,0,6) returns a polynomial (or to be precise: A symbolic expression that looks like a polynomial but is not implemented as an element of a polynomial ring, which from my experience is a difference that is not sufficiently appreciated by most calculus students using computer algebra systems), whereas LargeSchroeder.series(x,6) returns a Laurent series, i.e., it contains negative exponents: sage: LargeSchroeder.series(x,6) (-1/2)*x^(-1) + 3/2 + 2*x + 6*x^2 + 22*x^3 + 90*x^4 + 394*x^5 + Order(x^6) sage: LargeSchroeder.taylor(x,0,6) 1806*x^6 + 394*x^5 + 90*x^4 + 22*x^3 + 6*x^2 + 2*x + 1 It surprises me that .series(x,6) has a pole (after all, LargeSchroeder's discontinuity in x=0 seems removable), so perhaps it's a bug, but perhaps it's a feature after all --- I cannot tell from the documentation if it is intended or not. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] taylor versus series
Hi, I get with Maple: LargeSchroeder := (1 - x - sqrt(1 - 6*x + x^2))/(2*x); series(LargeSchroeder, x, 6); taylor(LargeSchroeder, x=0, 6); 1+2*x+6*x^2+22*x^3+90*x^4+394*x^5+O(x^6) 1+2*x+6*x^2+22*x^3+90*x^4+394*x^5+O(x^6) Both functions give the same result. Not so with Sage. With Sage 8.4: LargeSchroeder = SR((1 - x - sqrt(1 - 6*x + x^2))/(2*x)) print(LargeSchroeder.taylor(x, 0, 6).list()) print(LargeSchroeder.series(x, 6).list()) [1, 2, 6, 22, 90, 394, 1806] [3/2, 2, 6, 22, 90, 394] Bug or feature? Moreover taylor? .. gives hints series? .. Object `series` not found. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.