Changeset de558d in git
 Timestamp:
 Jan 16, 2007, 3:35:59 PM (17 years ago)
 Branches:
 (u'fiekerDuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b21a664aa22dc6e196223af8a74ad4885e83547c')
 Children:
 d6374d5c83927a37606173b8aa4e0d482a1dc578
 Parents:
 fe62d07e5844478d6a97ee30f1771e0a7cdcb93d
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/ipshell.cc
rfe62d0 rde558d 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipshell.cc,v 1.1 49 20070116 14:05:12Singular Exp $ */4 /* $Id: ipshell.cc,v 1.150 20070116 14:35:59 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: … … 1802 1802 // 5: D 1803 1803 ring R=(ring) omAlloc0Bin(sip_sring_bin); 1804 if (L>m[0].Typ()==INT_CMD)1805 {1806 R>ch=(int)(long)L>m[0].Data();1807 if (R>ch!=1)1808 {1809 int l;1810 if (((R>ch!=0) && (R>ch<2))1811 #ifndef NV_OPS1812  (R>ch > 32003)1813 #endif1814  ((l=IsPrime(R>ch))!=R>ch)1815 )1816 {1817 Warn("%d is invalid characteristic of ground field. %d is used.", R>ch,l);1818 R>ch=l;1819 }1820 }1821 }1822 else if (L>m[0].Typ()==LIST_CMD)1823 {1824 lists LL=(lists)L>m[0].Data();1825 if (LL>nr<3)1826 rComposeC(LL,R); /* R, long_R, long_C */1827 else1828 {1829 R>algring=rCompose((lists)L>m[0].Data());1830 if (R>algring==NULL)1831 {1832 WerrorS("could not create rational function coefficient field");1833 goto rCompose_err;1834 }1835 if (R>algring>ch>0)1836 R>ch= R>algring>ch;1837 else1838 R>ch=1;1839 R>P=R>algring>N;1840 R>parameter=(char**)omAlloc0(R>P*sizeof(char_ptr));1841 int i;1842 for(i=R>P1;i>=0;i)1843 R>parameter[i]=omStrDup(R>algring>names[i]);1844 if (R>algring>qideal!=NULL)1845 {1846 if (IDELEMS(R>algring>qideal)==1)1847 {1848 R>minpoly=pGetCoeff(R>algring>qideal>m[0]);1849 omFreeBinAddr(R>algring>qideal>m[0]);1850 R>algring>qideal>m[0]=NULL;1851 idDelete(&(R>algring>qideal));1852 }1853 else1854 {1855 WerrorS("not implemented yet.");1856 }1857 }1858 }1859 }1860 else1861 {1862 WerrorS("coefficient field must be described by `int` or `list`");1863 goto rCompose_err;1864 }1865 1804 //  VARS  1866 1805 if (L>m[1].Typ()==LIST_CMD) … … 2023 1962 goto rCompose_err; 2024 1963 } 1964 //  1965 // 0: char: 1966 if (L>m[0].Typ()==INT_CMD) 1967 { 1968 R>ch=(int)(long)L>m[0].Data(); 1969 if (R>ch!=1) 1970 { 1971 int l; 1972 if (((R>ch!=0) && (R>ch<2)) 1973 #ifndef NV_OPS 1974  (R>ch > 32003) 1975 #endif 1976  ((l=IsPrime(R>ch))!=R>ch) 1977 ) 1978 { 1979 Warn("%d is invalid characteristic of ground field. %d is used.", R>ch,l); 1980 R>ch=l; 1981 } 1982 } 1983 } 1984 else if (L>m[0].Typ()==LIST_CMD) 1985 { 1986 lists LL=(lists)L>m[0].Data(); 1987 if (LL>nr<3) 1988 rComposeC(LL,R); /* R, long_R, long_C */ 1989 else 1990 { 1991 R>algring=rCompose((lists)L>m[0].Data()); 1992 if (R>algring==NULL) 1993 { 1994 WerrorS("could not create rational function coefficient field"); 1995 goto rCompose_err; 1996 } 1997 if (R>algring>ch>0) 1998 R>ch= R>algring>ch; 1999 else 2000 R>ch=1; 2001 R>P=R>algring>N; 2002 R>parameter=(char**)omAlloc0(R>P*sizeof(char_ptr)); 2003 int i; 2004 for(i=R>P1;i>=0;i) 2005 R>parameter[i]=omStrDup(R>algring>names[i]); 2006 if (R>algring>qideal!=NULL) 2007 { 2008 if (IDELEMS(R>algring>qideal)==1) 2009 { 2010 R>minpoly=naInit(1); 2011 lnumber n=(lnumber)R>minpoly; 2012 n>z=R>algring>qideal>m[0]; 2013 R>algring>qideal>m[0]=NULL; 2014 idDelete(&(R>algring>qideal)); 2015 } 2016 else 2017 { 2018 WerrorS("not implemented yet."); 2019 } 2020 } 2021 } 2022 } 2023 else 2024 { 2025 WerrorS("coefficient field must be described by `int` or `list`"); 2026 goto rCompose_err; 2027 } 2025 2028 //  QIDEAL  2026 2029 rComplete(R); … … 2031 2034 if (q>m[0]!=NULL) 2032 2035 { 2033 if ((R>ch!=currRing>ch) 2034  (R>P!=currRing>P)) 2036 if (R>ch!=currRing>ch) 2035 2037 { 2036 2038 #if 0
Note: See TracChangeset
for help on using the changeset viewer.