1 | if (rField_is_GF(r)) |
---|

2 | { |
---|

3 | Print("// # ground field : %d\n",rInternalChar(r)); |
---|

4 | Print("// primitive element : %s\n", r->parameter[0]); |
---|

5 | if (r==currRing) |
---|

6 | { |
---|

7 | StringSetS("// minpoly : "); |
---|

8 | nfShowMipo();PrintS(StringAppendS("\n")); |
---|

9 | } |
---|

10 | } |
---|

11 | #ifdef HAVE_RINGS |
---|

12 | else if (rField_is_Ring(r)) |
---|

13 | { |
---|

14 | PrintS("// coeff. ring is : "); |
---|

15 | if (rField_is_Ring_Z(r)) PrintS("Integers\n"); |
---|

16 | long l = (long)mpz_sizeinbase(r->ringflaga, 10) + 2; |
---|

17 | char* s = (char*) omAlloc(l); |
---|

18 | mpz_get_str(s,10,r->ringflaga); |
---|

19 | if (rField_is_Ring_ModN(r)) Print("Z/%s\n", s); |
---|

20 | if (rField_is_Ring_2toM(r)) Print("Z/2^%lu\n", r->ringflagb); |
---|

21 | if (rField_is_Ring_PtoM(r)) Print("Z/%s^%lu\n", s, r->ringflagb); |
---|

22 | omFreeSize((ADDRESS)s, l); |
---|

23 | } |
---|

24 | #endif |
---|

25 | else |
---|

26 | { |
---|

27 | PrintS("// characteristic : "); |
---|

28 | if ( rField_is_R(r) ) PrintS("0 (real)\n"); /* R */ |
---|

29 | else if ( rField_is_long_R(r) ) |
---|

30 | Print("0 (real:%d digits, additional %d digits)\n", |
---|

31 | r->float_len,r->float_len2); /* long R */ |
---|

32 | else if ( rField_is_long_C(r) ) |
---|

33 | Print("0 (complex:%d digits, additional %d digits)\n", |
---|

34 | r->float_len, r->float_len2); /* long C */ |
---|

35 | else |
---|

36 | Print ("%d\n",rChar(r)); /* Fp(a) */ |
---|

37 | if (r->parameter!=NULL) |
---|

38 | { |
---|

39 | Print ("// %d parameter : ",rPar(r)); |
---|

40 | char **sp=r->parameter; |
---|

41 | int nop=0; |
---|

42 | while (nop<rPar(r)) |
---|

43 | { |
---|

44 | PrintS(*sp); |
---|

45 | PrintS(" "); |
---|

46 | sp++; nop++; |
---|

47 | } |
---|

48 | PrintS("\n// minpoly : "); |
---|

49 | if ( rField_is_long_C(r) ) |
---|

50 | { |
---|

51 | // i^2+1: |
---|

52 | Print("(%s^2+1)\n",r->parameter[0]); |
---|

53 | } |
---|

54 | else if (r->minpoly==NULL) |
---|

55 | { |
---|

56 | PrintS("0\n"); |
---|

57 | } |
---|

58 | else if (r==currRing) |
---|

59 | { |
---|

60 | StringSetS(""); nWrite(r->minpoly); PrintS(StringAppendS("\n")); |
---|

61 | } |
---|

62 | else |
---|

63 | { |
---|

64 | PrintS("...\n"); |
---|

65 | } |
---|

66 | if (r->minideal!=NULL) |
---|

67 | { |
---|

68 | if (r==currRing) iiWriteMatrix((matrix)r->minideal,"// minpolys",1,r,0); |
---|

69 | else PrintS("// minpolys=..."); |
---|

70 | PrintLn(); |
---|

71 | } |
---|

72 | } |
---|

73 | } |
---|