version 1.3, 2016/06/29 12:08:51 |
version 1.4, 2017/02/22 04:53:13 |
Line 162 cmo_qq *GEN_to_cmo_qq(GEN z) |
|
Line 162 cmo_qq *GEN_to_cmo_qq(GEN z) |
|
den = (GEN)z[2]; |
den = (GEN)z[2]; |
c = new_cmo_qq(); |
c = new_cmo_qq(); |
mpz_import(mpq_numref(c->mpq),lgef(num)-2,1,sizeof(long),0,0,&num[2]); |
mpz_import(mpq_numref(c->mpq),lgef(num)-2,1,sizeof(long),0,0,&num[2]); |
mpz_import(mpq_denref(c->mpq),lgef(num)-2,1,sizeof(long),0,0,&den[2]); |
mpz_import(mpq_denref(c->mpq),lgef(den)-2,1,sizeof(long),0,0,&den[2]); |
if ( signe(num)*signe(den) < 0 ) |
if ( signe(num)*signe(den) < 0 ) |
mpz_neg(mpq_numref(c->mpq),mpq_numref(c->mpq)); |
mpz_neg(mpq_numref(c->mpq),mpq_numref(c->mpq)); |
return c; |
return c; |