La recherche a retourné 118 résultats

par jocaps
mer. juin 20, 2018 7:47 am
Forum : Xcas - English
Sujet : simult with non-square system
Réponses : 1
Vues : 334

simult with non-square system

Hi, The command simult seems to only work on a square-system. So simult(A,b) will only deliver an answer if A is a square matrix. Is there possibly an option that makes it work if A is not a square matrix (similar to linsolve , but I do not want to create the linear equations to use linsolve here)? ...
par jocaps
jeu. juin 14, 2018 11:03 am
Forum : Giacpy
Sujet : Digits and giacpy
Réponses : 3
Vues : 717

Re:

Run proot(expression,n) where n is an integer for more precision. Nice one! Thanks. I have more precision now :) . BTW, can you remind me again how to express a symbol "x" as an algebraic element corresponding to a root (modulo conjugate) of a polynomial. I forgot this. So for instance I want to us...
par jocaps
mer. juin 06, 2018 9:01 pm
Forum : Giacpy
Sujet : Digits and giacpy
Réponses : 3
Vues : 717

Digits and giacpy

Hi, It seems that giacpy only gives me python float precision when solving numerical values (eg. with proot and froot). Consider the following code from giacpy import giac, proot giac("printpow(1)") giac("Digits := 38") giac("Digits") #tells me if giac indeed set the precision to 38 digits #outputs ...
par jocaps
ven. juin 01, 2018 8:26 pm
Forum : Giacpy
Sujet : proot and roots with multiplicity
Réponses : 1
Vues : 507

proot and roots with multiplicity

Hi, In giac if I have a polynomial with multiple roots, I also get multiple roots with proot (I cannot rely on root etc. because my polynomials have generally large degrees). This often leads to problem in my program. So I need to convert the output root into a set (python type) or something that wi...
par jocaps
lun. mai 28, 2018 5:33 pm
Forum : Xcas - English
Sujet : gaurantee for exact algebraic number from "roots"
Réponses : 3
Vues : 432

Re:

Hi Bernard, Thank you for the suggestion. I realized there was rootof after my post. But I am not sure what to do with it alone if I want to get all the roots (exact solutions), because I really need these roots for another computation (so not only one of the roots, r:=rootof(g)). The only way I can...
par jocaps
lun. mai 28, 2018 4:02 pm
Forum : Xcas - English
Sujet : gaurantee for exact algebraic number from "roots"
Réponses : 3
Vues : 432

gaurantee for exact algebraic number from "roots"

Hi, Consider g:=x^6+x^4+x+2 rts:=roots(g) In my current version of XCas I get the warning Warning! Algebraic extension not implemented yet for poly [1,0,1,0,0,1,2] So my impression is that XCas/giac will not save these values as some algebraic numbers (exact roots) and my fear is that if I continue ...
par jocaps
dim. mai 27, 2018 8:59 am
Forum : Giac
Sujet : graph theory commands for Giac
Réponses : 198
Vues : 18759

Re: Re:

@lukamar: Sorry for the late reply. I do not know about the paper you cite (apparently by microsoft researchers). But I know that the algorithms of McKay are trusted and cited regularly by graph-theorists. His C++ package (nauty) is very light-weight and has absolutely no dependencies whatsoever (I ...
par jocaps
jeu. mai 24, 2018 11:20 am
Forum : Giac
Sujet : graph theory commands for Giac
Réponses : 198
Vues : 18759

Re:

@lukamar: I think this is a great development. Thank you for the implementation.

Is there an implementation for checking isomorphic graphs as well? If so, any way to compare it with known implementations (e.g. naughty).

Jose
par jocaps
dim. mai 06, 2018 10:06 am
Forum : Giac
Sujet : evaluating algebraic expression in c++
Réponses : 1
Vues : 683

evaluating algebraic expression in c++

Hi, How do you evaluate a symbolic expression in C++? If I do this giac::gen dbg("1+1",&ct); dbg = giac::eval(dbg, &ct); cout << gen2string(dbg) << endl; I correctly get "2" But if I do this: giac::gen dbg("x+2*x",&ct); dbg = giac::eval(dbg, &ct); cout << gen2string(dbg) << endl; I still get "x+2*x"...
par jocaps
mar. mai 01, 2018 10:54 am
Forum : Giac
Sujet : Sample use of gbasis in C++
Réponses : 14
Vues : 3395

Re:

Looking at the callers of Add_gen, it seems that the test will never be true, but I don't want to change the code. There is probably a define for visualc++ to avoid this additional (stupid) check. No problem, I understand that this is very sensitive so we do not want to break the code. I was able t...
par jocaps
mar. mai 01, 2018 8:01 am
Forum : Giac
Sujet : Sample use of gbasis in C++
Réponses : 14
Vues : 3395

Re:

I don't understand why there would be a problem, a, a_end etc. are std::vector< monomial<gen> >::const_iterator, new_coord is a std::vector< monomial<gen> >, therefore comparing a to new_coord.begin() makes sense. I think this is compiler/linker dependent (unfortunately this can be noticed as late ...
par jocaps
lun. avr. 30, 2018 8:21 pm
Forum : Giac
Sujet : Sample use of gbasis in C++
Réponses : 14
Vues : 3395

The forum will move to a new hardware/latest version of phpbb in a few days (or maybe weeks), it's not worth making changes here now... Ah ok. Wonderful, thanks for informing. I tried to continue with my debugging. I had to remove GIAC_VECTOR in my preprocessor because I think I could get to the ca...
par jocaps
lun. avr. 30, 2018 1:08 pm
Forum : Giac
Sujet : Sample use of gbasis in C++
Réponses : 14
Vues : 3395

Re:

Hi Bernard, I am not getting any wiser with debugging. But maybe there is a clue. I have noticed that in visual studio the preprocessor definition IMMEDIATE_VECTOR is used, is this relevant? Jose PS: Would it be possible for the admin of this forum to allow writing inline code. Sometimes writing a c...
par jocaps
lun. avr. 30, 2018 12:59 pm
Forum : Giacpy
Sujet : hashing polynomials
Réponses : 3
Vues : 1038

Re:

Indeed I should have add a hash method but I don't know a hash function for a gen in giac. Bernard, is there already some hash function in giac that I could use because I fear that: def __hash__(self): return hash(str(self)) would help but it could be very slow. I think using str is a bad idea e.g....
par jocaps
ven. avr. 27, 2018 1:55 pm
Forum : Giacpy
Sujet : hashing polynomials
Réponses : 3
Vues : 1038

hashing polynomials

Hi, Maybe this is a giacpy tip of the day, or maybe this is a question... In python it would sometimes be beneficial if you could put some giacpy gen types into a dictionary or a set. As a simple example, consider a polynomial x^2+1. The following code will fail from giacpy import giac f=giac("x^2+1...