[sage-support] Counting of combinations

2024-01-04 Thread Peter Luschny
Hi all, please consider this counting of special combinations: def C(n, k): return Compositions(n, max_part=k, inner=[k]).cardinality() for n in (0..4): print([C(n, k) for k in (0..n)]) [0] [0, 1] [0, 1, 1] [0, 1, 1, 1] [0, 1, 2, 1, 1] Edge cases are

[sage-support] error while bulid

2024-01-04 Thread 有和没theone
Error building Sage. The following package(s) may have failed to build (not necessarily during this run of 'make all-start'): * package: ecl-21.2.1 last build time: 1月 4 23:14 log file: /home/yhmlivefo/文档/sage10/sage-10.2/logs/pkgs/ecl-21.2.1.log build directory:

Re: [sage-support] Re: Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Dima Pasechnik
On 4 January 2024 12:15:07 WET, Emmanuel Charpentier wrote: > > >Indeed : >(%i29) domain:complex; (%o29) complex (%i30) Sol1C:solve(Sys1, Unks); >(%o30) [[x = 8,y = -40/3,l = (2*25^(1/3))/(3*9^(1/3))]] (%i31) >Sol2C:solve(Sys2, Unks); (%o31) [] (%i32) map(lambda([w], map(lambda([v],

Re: [sage-support] Re: Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Oscar Benjamin
On Thu, 4 Jan 2024 at 12:15, Emmanuel Charpentier wrote: > > But this does not explain whiy Sage is uneble o check (numericalmlmy or > otherwise) the solutions given by Sympy or Mathematica, which check in Sympy > (I didn’t yet try to check them in Mathematica, the limitations of the > current

[sage-support] Re: Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Emmanuel Charpentier
Indeed : (%i29) domain:complex; (%o29) complex (%i30) Sol1C:solve(Sys1, Unks); (%o30) [[x = 8,y = -40/3,l = (2*25^(1/3))/(3*9^(1/3))]] (%i31) Sol2C:solve(Sys2, Unks); (%o31) [] (%i32) map(lambda([w], map(lambda([v], subst(w, v)), map(lambda([u], ratsimp(lhs(u)-rhs(u))), Sys1))), Sol1C);

[sage-support] Re: Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Dima Pasechnik
You can get the same errors from pure Maxima if you set domain to "complex", no? On Thursday, January 4, 2024 at 10:29:56 AM UTC Emmanuel Charpentier wrote: > The problem seems Sage-specific : the same systems solve correctly (up to > numerical noise) in “pure” Maxima : > ;;; Loading

[sage-support] Re: Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Emmanuel Charpentier
The problem seems Sage-specific : the same systems solve correctly (up to numerical noise) in “pure” Maxima : ;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-21.2.1/sb-bsd-sockets.fas" ;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-21.2.1/sockets.fas" Maxima 5.46.0 https://maxima.sourceforge.io

[sage-support] Re: limitations of "solve"?

2024-01-04 Thread Emmanuel Charpentier
These systems and Sage’s “solutions” exhibit some *serious* problems. See there … ​ Le mardi 2 janvier 2024 à 12:30:14 UTC+1, Emmanuel Charpentier a écrit : > FWIW, a working workaround this interesting Maxima quirk (bug ?) is to use >

[sage-support] Re: limitations of "solve"?

2024-01-04 Thread Emmanuel Charpentier
These systems and Sage's "solutions" exhibit some *serious* problems. See [there](https://groups.google.com/g/sage-support/c/gGssS_15jxE)... Le mardi 2 janvier 2024 à 12:30:14 UTC+1, Emmanuel Charpentier a écrit : > FWIW, a working workaround this interesting Maxima quirk (bug ?) is to use >

[sage-support] Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Emmanuel Charpentier
Motivation : see [this post], which shows a case where Sage fails to find the roots of a three equations system. I signalled in this thread that Sympy was able to find these roots. But I stumbled on a difficulty checking these solutions. Set up the systems : # Pretext :