Re: [sage-devel] Re: Help with matroids (and more generally?), PR #36492

2024-02-09 Thread 'Travis Scrimshaw' via sage-devel
Question for humans: I'm planning on merging this into sage so that other developers can help grow it and it's not just me working on it. Would it be better to first wait for any bugs that people might notice and then add it into sage? Or should I just go ahead and start merging it in and any

Re: [sage-devel] Re: Exception in floor(tanh(91))

2024-02-09 Thread Nils Bruin
On Friday 9 February 2024 at 08:16:03 UTC-8 Georgi Guninski wrote: When I try to extract digits of tanh(91) via floor, I still get error sage: floor(10^4*tanh(91)) ValueError The sage code doesn't use gp for this. The error you're encountering happens in

[sage-devel] Re: Exception in sum((4*n+1)/factorial(n),n,1,oo)

2024-02-09 Thread Emmanuel Charpentier
Le vendredi 9 février 2024 à 15:42:30 UTC+1, Eric Gourgoulhon a écrit : I confirm the bug with Sage 10.3.beta7. It seems to be linked with the Maxima interface. Meanwhile, a workaround is to use the SymPy interface: sage: sum((4*n+1)/factorial(n), n, 1, oo, algorithm='sympy') 5*e - 1 FWIW,

Re: [sage-devel] Re: Help with matroids (and more generally?), PR #36492

2024-02-09 Thread Matthias Koeppe
The next step of integration could be to add this package as an optional package to Sage, see https://github.com/sagemath/sage/issues/31164 On Friday, February 9, 2024 at 12:04:16 PM UTC-8 Aram Dermenjian wrote: > As a follow up to this email thread: Everything should be working now. If >

Re: [sage-devel] Re: Help with matroids (and more generally?), PR #36492

2024-02-09 Thread Aram Dermenjian
As a follow up to this email thread: Everything should be working now. If people want to test it out and/or see if there are any bugs/issues, feel free to have at it and add any issues into the github. Question for humans: I'm planning on merging this into sage so that other developers can help

Re: [sage-devel] Re: Exception in floor(tanh(91))

2024-02-09 Thread Vincent Delecroix
The following is the proper way to extract digits sage: tanh(91).numerical_approx(digits=10) 1.0 sage: tanh(91).numerical_approx(digits=100) 0.998182667935304138503930 On Fri, 9 Feb 2024 at 17:16, Georgi Guninski

Re: [sage-devel] Re: Installing sagemath on macOS

2024-02-09 Thread Sai Chandhrasekhar
I was able to install SageMath and get it running. Thank you very much for all of your help. On Friday, February 9, 2024 at 12:38:29 AM UTC-6 Matthias Koeppe wrote: > In the terminal output, it looks like you are installing sagemath-standard > 10.2 in an environment with sage-conf 10.3.beta7.

Re: [sage-devel] Unify error for trying to invert non-invertible elements

2024-02-09 Thread Nils Bruin
The main relevance of classifying errors properly in python is for try/except. Generally, a try/except should be tight both in code guarded and in errors caught. An `except RuntimeError` is almost certainly a bad idea. `except ZeroDivisionError` looks quite reasonable. `except ValueError` or

Re: [sage-devel] Re: Exception in floor(tanh(91))

2024-02-09 Thread Georgi Guninski
When I try to extract digits of tanh(91) via floor, I still get error sage: floor(10^4*tanh(91)) ValueError sage: gp('floor(10^4*tanh(91))') 1 gp computes it both ways :) sage: gp.default('realprecision',10^5) 0 sage: gp('floor(tanh(91))') 0 -- You received this message because you are

[sage-devel] Re: Exception in floor(tanh(91))

2024-02-09 Thread dmo...@deductivepress.ca
The ValueError is correct -- the quantity is so close to 1 that numerics cannot tell whether the floor is 0 or 1. You could report a bug to gp, though, because the correct answer is 0, not 1. On Friday, February 9, 2024 at 10:48:41 AM UTC-5 Georgi Guninski wrote: > hi, > > floor(tanh(91)) > >

[sage-devel] Exception in floor(tanh(91))

2024-02-09 Thread Georgi Guninski
hi, floor(tanh(91)) ValueError: cannot compute floor(sinh(91)/cosh(91)) using 256 bits of precision gp('floor(tanh(91))') 1 -- 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

Re: [sage-devel] Re: Exception in sum((4*n+1)/factorial(n),n,1,oo)

2024-02-09 Thread Oscar Benjamin
The NoneType error is presumably a bug in the sage wrapper code. Possibly related is that Maxima cannot compute the sum with its default algorithm. It does have a simplify_sum function that can do it though: (%i19) load (simplify_sum); (%o19)

[sage-devel] Re: Exception in sum((4*n+1)/factorial(n),n,1,oo)

2024-02-09 Thread Eric Gourgoulhon
I confirm the bug with Sage 10.3.beta7. It seems to be linked with the Maxima interface. Meanwhile, a workaround is to use the SymPy interface: sage: sum((4*n+1)/factorial(n), n, 1, oo, algorithm='sympy') 5*e - 1 Eric. Le vendredi 9 février 2024 à 11:57:08 UTC+1, Georgi Guninski a écrit : >

[sage-devel] Exception in sum((4*n+1)/factorial(n),n,1,oo)

2024-02-09 Thread Georgi Guninski
hi, var('n') sum((4*n+1)/factorial(n),n,1,oo) TypeError: 'NoneType' object is not callable -- 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

Re: [sage-devel] Unify error for trying to invert non-invertible elements

2024-02-09 Thread 'Travis Scrimshaw' via sage-devel
You're misunderstanding what a catch-all means. It means *any* type (of error) is reasonable. To put it mathematically, catch-all means union (of sets), but the Python doc means difference (of sets). An assertion is slightly different. It can (in principle) be turned off and is just used for