Re: [sage-cell] Re: [sage-devel] Sage cells in interact wiki

2016-10-09 Thread Andrey Novoseltsev
On Monday, 19 September 2016 18:59:09 UTC-6, Jason Grout wrote:
>
> Some ideas:
>
> Is the MoinMoin sage cell extension enabled? 
> https://github.com/sagemath/sagecell/blob/master/contrib/moinmoin/sagecell.py.
>  If 
> it is enabled, was MoinMoin updated and the extension no longer works?
>
> Thanks,
>
> Jason
>

Thanks for the pointer, Jason! Cells are created now but it would be great 
to go over interacts to fix deprecated and broken things or report new bugs.


>
> On Mon, Sep 19, 2016 at 8:48 PM William Stein  > wrote:
>
>> On Mon, Sep 19, 2016 at 1:46 PM, Andrey Novoseltsev > > wrote:
>>
>>> On Monday, 19 September 2016 10:53:27 UTC-6, William wrote:

 This seems to be an absolutely *massive* issue, which I'm sure was 
 caused by some API change by Andrey.  These wiki pages have worked fine 
 for 
 about 7 years, so it's annoying that they are all suddenly broken. 

 > I guess it was meant to use the Sage cell server to make the 
 examples actually work but it doesn't do that anymore.

 They did actually work (and well) until very, very recently.

>>>
>>> Do you have a better idea of how recently? Week/month/several months? 
>>>
>>
>> Hmm.  This could also coincide with when Mike Hansen moved the wiki to 
>> GCE.
>>  
>>
>>>
>>> Looking at the page source, I do not understand how embedded_sagecell.js 
>>> is supposed to load and there are no requests for it reported by browser. 
>>> Console complains about $, so something is off with jQuery, I guess. For 
>>> the record there is no need to load/use it with sagecell.makeSagecell at 
>>> all. And as "official API" that I am trying hard not to break (or at least 
>>> fix when I do) I consider 
>>> https://github.com/sagemath/sagecell/blob/master/doc/embedding.rst
>>>
>>> So - it does not work indeed, but I have no idea why and I hope that I 
>>> am not responsible ;-)
>>>
>>
>> I now think that you are not responsible at all.  Thanks for the hints 
>> above!
>>  
>>
>>>
>>> Thank you!
>>> Andrey
>>>
>>>
  -- William

 On Mon, Sep 19, 2016 at 6:04 AM, Jeroen Demeyer  
 wrote:

> The "interact" wiki page
> https://wiki.sagemath.org/interact
> is seriously broken: I guess it was meant to use the Sage cell server 
> to make the examples actually work but it doesn't do that anymore. What 
> is 
> worse: also the source code is not shown, making the examples almost 
> totally useless...
>
> Well, the Sage source code is still in the source of the wiki page, 
> but that's not very practical. However, there seem to be some 
> backslash-escaping going on, making the examples not 100% copy-pastable.
>
> Some context: I am working on an implementation of the SageNB 
> interacts in Jupyter at https://trac.sagemath.org/ticket/21267 and 
> that page is a valuable source of examples for me.
>
> -- 
> You received this message because you are subscribed to the Google 
> Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>



 -- 
 William (http://wstein.org)

>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "sage-cell" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to sage-cell+...@googlegroups.com .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/sage-cell/87a9ae7b-5ea6-4a7f-b435-5eced2efe633%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> William (http://wstein.org)
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sage-cell" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-cell+...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-cell/CACLE5GBwhA4TrzSKYQamL_DN93oiFLqWCtkK445dGwse50JWQw%40mail.gmail.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To 

[sage-devel] Is Brown's construction available in the graph component of sagemath?

2016-10-09 Thread ni732h . sphl
Brown's construction is the function which takes a finite field to a graph 
with diameter 2.
http://www.emis.ams.org/journals/EJC/Surveys/ds14.pdf

Is it available in the graph component of sagemath?
If not, I plan to implement it for sagemath.

yawara

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Giving Sage AI-based step-by-step equation solving abilities

2016-10-09 Thread David Joyner
On Sun, Oct 9, 2016 at 2:20 PM, Ted Kosan  wrote:
> David wrote:
>
>> I think a graphical version of this would be useful as a sage-based
>> online high school math tutorial program, such as the khan academy
>> algebra modules.
>
> Are either of the following examples close to what you have in mind?:
>
> http://data.ssucet.org/temp/solve_steps_example.png
>

This doesn't seem to have anything.

> https://www.youtube.com/watch?v=cy6bwNBkAK0
>

Not quite. I'm just talking about an automated system to help a create
student hint (like webassign has). A student goes through a khan
academy assignment, gets stuck, and they click a "help" button (which
would then call your program to create a series of graphics) to see
how a similar problem is solved step-by-step.

> Ted
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Giving Sage AI-based step-by-step equation solving abilities

2016-10-09 Thread Ted Kosan
David wrote:

> I think a graphical version of this would be useful as a sage-based
> online high school math tutorial program, such as the khan academy
> algebra modules.

Are either of the following examples close to what you have in mind?:

http://data.ssucet.org/temp/solve_steps_example.png

https://www.youtube.com/watch?v=cy6bwNBkAK0

Ted

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Giving Sage AI-based step-by-step equation solving abilities

2016-10-09 Thread David Joyner
On Sun, Oct 9, 2016 at 2:07 PM, Ted Kosan  wrote:
> For the past few years I have been working on an artificial intelligence
> step-by-step equation solver for elementary algebra equations that solves
> these equations using steps that a human would typically use. Here is an
> example of what I have working so far:
>
> In> LineForm(SolveSteps(MathParse("(8*x - 2 == -9 + 7*x)"), _x))
>
>   8*x - 2 == (-9) + 7*xThe original equation.
>   (8*x - 2) - ((-9) + 7*x) == 0Subtract (-9) + 7 * x from both
> sides.

...

>   x == (-7)Arithmetic.
>
> Is anybody interested in having step-by-step equation solving abilities like
> this added to Sage?
>

I think a graphical version of this would be useful as a sage-based
online high school math tutorial program, such as the khan academy
algebra modules.


> Ted
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Giving Sage AI-based step-by-step equation solving abilities

2016-10-09 Thread Ted Kosan
For the past few years I have been working on an artificial intelligence
step-by-step equation solver for elementary algebra equations that solves
these equations using steps that a human would typically use. Here is an
example of what I have working so far:

In> LineForm(SolveSteps(MathParse("(8*x - 2 == -9 + 7*x)"), _x))

  8*x - 2 == (-9) + 7*xThe original equation.
  (8*x - 2) - ((-9) + 7*x) == 0Subtract (-9) + 7 * x from both
sides.
  (8*x - 2) + (-1)*((-9) + 7*x) == 0Undefine a binary '-' operator.
  (8*x + (-1)*2) + (-1)*((-9) + 7*x) == 0Undefine a binary '-'
operator.
  (8*x + (-2)) + (-1)*((-9) + 7*x) == 0Arithmetic.
  (8*x + (-2)) + ((-1)*(-9) + (-1)*(7*x)) == 0Move occurrences of
the unknown higher.
  (8*x + (-2)) + (9 + (-1)*(7*x)) == 0Arithmetic.
  (8*x + (-2)) + (9 + ((-1)*7)*x) == 0Change the association of *
operators.
  (8*x + (-2)) + (9 + (-7)*x) == 0Arithmetic.
  ((-2) + 8*x) + (9 + (-7)*x) == 0Move a copy of the unknown to the
right.
  ((-2) + 8*x) + ((-7)*x + 9) == 0Move a copy of the unknown to the
left.
  (((-2) + 8*x) + (-7)*x) + 9 == 0Change the association of +
operators.
  ((-2) + (8*x + (-7)*x)) + 9 == 0Change the association of +
operators.
  ((-2) + (8 + (-7))*x) + 9 == 0Eliminate one copy of the unknown.
  (-2) + (8 + (-7))*x == 0 - 9Subtract 9 from both sides.
  (8 + (-7))*x == (0 - 9) - (-2)Subtract -2 from both sides.
  x == ((0 - 9) - (-2))/(8 + (-7))Divide both sides by 8 + (-7).
  x == (-7)Arithmetic.

Is anybody interested in having step-by-step equation solving abilities
like this added to Sage?

Ted

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: a 7(!) year old (Singular) overflow issue still holds

2016-10-09 Thread 'Bill Hart' via sage-devel


On Sunday, 9 October 2016 18:08:29 UTC+2, Dima Pasechnik wrote:
>
>
>
> On Sunday, October 9, 2016 at 3:35:57 PM UTC, Bill Hart wrote:
>>
>> By default, Singular uses 16 bit exponents. But it is perfectly capable 
>> of working with exponents up to 64 bits. That will be slower of course.
>>
>> why? I presume arithmetic on 16-bit integers is not faster than on 
> 32-bit, or even 64-bit.
>

It's the exponent arithmetic, not the coefficients we are talking about.

The exponents are packed, with four 16 bit field in a 64 bit word. This is 
*much* faster. I use the same trick, as does just about every decent 
computer algebra system out there.

Interestingly, Magma only allows exponents up to about 30 bits, but it 
takes a few minutes to compute x^(2^30 - 1).
 

>  
>  
>
>> I guess it isn't easy for Sage to change the relevant ring upon overflow 
>> to one using 64 bit exponents.
>>
>> I can't say whether it would be easy or hard for Singular to 
>> automatically change the exponent size for you. For basic arithmetic, I 
>> have implemented precisely this in the code I've been writing. But Singular 
>> is almost infinitely more complex than the very simple cases I've been 
>> dealing with in my own code. At this stage I couldn't even hazard a guess.
>>
>> I'll ask Hans if I remember. But either way, I believe this would be an 
>> *extremely* time consuming thing to fix. How important is it?
>>
>> Bill.
>>
>> On Wednesday, 5 October 2016 01:10:31 UTC+2, Jakob Kroeker wrote:
>>>
>>>
>>> https://trac.sagemath.org/ticket/6472
>>>
>>> even for recent singular upgrade 
>>>
>>> https://trac.sagemath.org/ticket/17254
>>>
>>> and it was not(?) reported to upstream...
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: a 7(!) year old (Singular) overflow issue still holds

2016-10-09 Thread Dima Pasechnik


On Sunday, October 9, 2016 at 3:35:57 PM UTC, Bill Hart wrote:
>
> By default, Singular uses 16 bit exponents. But it is perfectly capable of 
> working with exponents up to 64 bits. That will be slower of course.
>
> why? I presume arithmetic on 16-bit integers is not faster than on 32-bit, 
or even 64-bit.
 
 

> I guess it isn't easy for Sage to change the relevant ring upon overflow 
> to one using 64 bit exponents.
>
> I can't say whether it would be easy or hard for Singular to automatically 
> change the exponent size for you. For basic arithmetic, I have implemented 
> precisely this in the code I've been writing. But Singular is almost 
> infinitely more complex than the very simple cases I've been dealing with 
> in my own code. At this stage I couldn't even hazard a guess.
>
> I'll ask Hans if I remember. But either way, I believe this would be an 
> *extremely* time consuming thing to fix. How important is it?
>
> Bill.
>
> On Wednesday, 5 October 2016 01:10:31 UTC+2, Jakob Kroeker wrote:
>>
>>
>> https://trac.sagemath.org/ticket/6472
>>
>> even for recent singular upgrade 
>>
>> https://trac.sagemath.org/ticket/17254
>>
>> and it was not(?) reported to upstream...
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: a 7(!) year old (Singular) overflow issue still holds

2016-10-09 Thread 'Bill Hart' via sage-devel
Note that Hans has fixed the fact that Singular wasn't reporting this as an 
overflow.

On Sunday, 9 October 2016 17:35:57 UTC+2, Bill Hart wrote:
>
> By default, Singular uses 16 bit exponents. But it is perfectly capable of 
> working with exponents up to 64 bits. That will be slower of course.
>
> I guess it isn't easy for Sage to change the relevant ring upon overflow 
> to one using 64 bit exponents.
>
> I can't say whether it would be easy or hard for Singular to automatically 
> change the exponent size for you. For basic arithmetic, I have implemented 
> precisely this in the code I've been writing. But Singular is almost 
> infinitely more complex than the very simple cases I've been dealing with 
> in my own code. At this stage I couldn't even hazard a guess.
>
> I'll ask Hans if I remember. But either way, I believe this would be an 
> *extremely* time consuming thing to fix. How important is it?
>
> Bill.
>
> On Wednesday, 5 October 2016 01:10:31 UTC+2, Jakob Kroeker wrote:
>>
>>
>> https://trac.sagemath.org/ticket/6472
>>
>> even for recent singular upgrade 
>>
>> https://trac.sagemath.org/ticket/17254
>>
>> and it was not(?) reported to upstream...
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: a 7(!) year old (Singular) overflow issue still holds

2016-10-09 Thread 'Bill Hart' via sage-devel
By default, Singular uses 16 bit exponents. But it is perfectly capable of 
working with exponents up to 64 bits. That will be slower of course.

I guess it isn't easy for Sage to change the relevant ring upon overflow to 
one using 64 bit exponents.

I can't say whether it would be easy or hard for Singular to automatically 
change the exponent size for you. For basic arithmetic, I have implemented 
precisely this in the code I've been writing. But Singular is almost 
infinitely more complex than the very simple cases I've been dealing with 
in my own code. At this stage I couldn't even hazard a guess.

I'll ask Hans if I remember. But either way, I believe this would be an 
*extremely* time consuming thing to fix. How important is it?

Bill.

On Wednesday, 5 October 2016 01:10:31 UTC+2, Jakob Kroeker wrote:
>
>
> https://trac.sagemath.org/ticket/6472
>
> even for recent singular upgrade 
>
> https://trac.sagemath.org/ticket/17254
>
> and it was not(?) reported to upstream...
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] To the attention of Nicolas M Thiéry (recursive-monkey-patch)

2016-10-09 Thread Emmanuel Charpentier
OK. I'll try that (yet another private branch on the top of my private 
branch...).

Since I'm going to patch symbolic expressions, do you see other candidates 
for "simple" (read "dumb") borrowing from Maxima ? demoivre and 
exponentialize are obvious candidates, as well as changevar (at least for 
the integration case ; i'm not sure about summation). Having a transparent 
Sage form would be useful (no need to convert back to Sage objects, call as 
a method, etc...).

Sage might benefit from some Maxima special functions (e. g. 
beta_incomplete and friends, fresnelxx, etc...) currently accessible via 
the maxima.xx interface. However, some of them have their own problems in 
Maxima (beta_incomplete_xx comes to mind). Do you have other "obvious" 
candidates ?

One could say the same thing about some sympy functions, currently without 
signification in Sage. Agaon, do you have a list ?

--
Emmanuel Charpentier

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] To the attention of Nicolas M Thiéry (recursive-monkey-patch)

2016-10-09 Thread Volker Braun
"sage -b" will rebuild any sage cython modules that were changed, so for 
your application its probably enough. It does not rebuild third-party 
packages or documentation.


On Sunday, October 9, 2016 at 12:06:25 PM UTC+2, Emmanuel Charpentier wrote:
>
> Le 9 oct. 2016 12:01, "Jori Mäntysalo"  
> a écrit :
> >
> > On Sun, 9 Oct 2016, Emmanuel Charpentier wrote:
> >
> >> sage.symbolic.expression.Expression, you jus have to patch the source 
> and
> >> recompile. That means a turnaround time of 10-40 minutes each time.
> >
> >
> > How? ./sabe -b takes less than a minute even on quite old machine.
>
> I'm not sure that, in this case, "sage -b"is enough...
>
> --
> Emmanuel Charpentier
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] To the attention of Nicolas M Thiéry (recursive-monkey-patch)

2016-10-09 Thread Emmanuel Charpentier
Le 9 oct. 2016 12:01, "Jori Mäntysalo"  a écrit :
>
> On Sun, 9 Oct 2016, Emmanuel Charpentier wrote:
>
>> sage.symbolic.expression.Expression, you jus have to patch the source and
>> recompile. That means a turnaround time of 10-40 minutes each time.
>
>
> How? ./sabe -b takes less than a minute even on quite old machine.

I'm not sure that, in this case, "sage -b"is enough...

--
Emmanuel Charpentier

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] To the attention of Nicolas M Thiéry (recursive-monkey-patch)

2016-10-09 Thread Jori Mäntysalo

On Sun, 9 Oct 2016, Emmanuel Charpentier wrote:


sage.symbolic.expression.Expression, you jus have to patch the source and
recompile. That means a turnaround time of 10-40 minutes each time.


How? ./sabe -b takes less than a minute even on quite old machine.

--
Jori Mäntysalo


Re: [sage-devel] To the attention of Nicolas M Thiéry (recursive-monkey-patch)

2016-10-09 Thread Emmanuel Charpentier
Thanks a lot for this prompt answer.

That's what I was afraid of : to add methods to 
sage.symbolic.expression.Expression, you jus have to patch the source and 
recompile. That means a turnaround time of 10-40 minutes each time. Better 
be sure of my syntax...

--
Emmanuel Charpentier

Le dimanche 9 octobre 2016 10:48:16 UTC+2, Nicolas M. Thiéry a écrit :
>
> Hi Emmanuel,
>
> Just a brief answer for now: recursive_monkey_patch is about structuring 
> the source code when you have a bunch of methods / classes that you want to 
> monkey patch. But the monkey patching itself happens exactly as you did by 
> hand, or as Andrew's decorator does: just assigning the method to the 
> class. So it's not going to help for your problem of patching a Cython 
> class, sorry.
>
> Cheers,
> Nicolas
>
> --
> *De: *"Emmanuel Charpentier" 
> *À: *"sage-devel" 
> *Envoyé: *Samedi 8 Octobre 2016 21:18:46
> *Objet: *[sage-devel] To the attention of Nicolas M Thiéry 
> (recursive-monkey-patch)
>
> Ncolas,
>
> Could you have a look at this thread 
>  in 
> sage-support ? I'm trying to use your recursive-monkey-patch 
>  module, but 
> can't make head or tail from your instructions.
>
> Thanks in advance,
>
> --
> Emmanuel Charpentier
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+...@googlegroups.com .
> To post to this group, send email to sage-...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] To the attention of Nicolas M Thiéry (recursive-monkey-patch)

2016-10-09 Thread Nicolas Thiery
Hi Emmanuel, 

Just a brief answer for now: recursive_monkey_patch is about structuring the 
source code when you have a bunch of methods / classes that you want to monkey 
patch. But the monkey patching itself happens exactly as you did by hand, or as 
Andrew's decorator does: just assigning the method to the class. So it's not 
going to help for your problem of patching a Cython class, sorry. 

Cheers, 
Nicolas 

- Mail original -

De: "Emmanuel Charpentier"  
À: "sage-devel"  
Envoyé: Samedi 8 Octobre 2016 21:18:46 
Objet: [sage-devel] To the attention of Nicolas M Thiéry 
(recursive-monkey-patch) 

Ncolas, 

Could you have a look at this thread in sage-support ? I'm trying to use your 
recursive-monkey-patch module, but can't make head or tail from your 
instructions. 

Thanks in advance, 

-- 
Emmanuel Charpentier 



-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group. 
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com . 
To post to this group, send email to sage-devel@googlegroups.com . 
Visit this group at https://groups.google.com/group/sage-devel . 
For more options, visit https://groups.google.com/d/optout . 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: gamma(QQbar(...))

2016-10-09 Thread Ralf Stephan


On Friday, October 7, 2016 at 1:00:08 PM UTC+2, Clemens Heuberger wrote:
>
>
> I was surprised by the following behaviour: 
>
> sage: gamma(QQbar(sqrt(2))) 
> 0.886581428719259 
> sage: gamma(QQbar(sqrt(2))).parent() 
> Complex Field with 53 bits of precision 
>
> (I would have preferred to have some symbolic answer or at least an answer 
> in 
> CIF, but not in CC) 
>

There seems to be no way to effectively guarantee "What goes in goes out (at
least nearly)" except writing a dedicated QQbar.gamma() member function.
OTOH as soon as you return something other than QQbar from such a member
purists will roast you.

CIF doesn't have gamma() either but usage of CIF should be rethought in the 
light of
sage: ComplexBallField(100)(sqrt(2)).gamma()
[0.8865814287192591250809176124 +/- 2.00e-29]

Really, arb functionality and integration does not leave much to desire, so 
use it.

As to a possible symbolic result (is there one?) this could be added to the
symbolic gamma().


> Furthermore: 
>
> sage: gamma(QQbar(1/2)) 
> Traceback (most recent call last): 
> ... 
> TypeError: no canonical coercion from Algebraic Field to Rational Field 
>

That seems a genuine bug.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.