This file is indexed.

/usr/share/axiom-20170501/src/algebra/CMPLXRT.spad is in axiom-source 20170501-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
)abbrev package CMPLXRT ComplexRootPackage
++ Author: P. Gianni
++ Description:
++ This package provides functions complexZeros
++ for finding the complex zeros
++ of univariate polynomials with complex rational number coefficients.
++ The results are to any user specified precision and are returned
++ as either complex rational number or complex floating point numbers
++ depending on the type of the second argument which specifies the
++ precision.


ComplexRootPackage(UP,Par) : SIG == CODE where
  UP : UnivariatePolynomialCategory Complex Integer
  Par : Join(Field, OrderedRing) -- will be Float or RN

  RN     ==> Fraction Integer
  I      ==> Integer
  NF     ==> Float
  CP   ==> Complex Par
  PCI  ==> Polynomial Complex Integer

  SIG ==> with

    complexZeros : (UP,Par)  -> List CP
      ++ complexZeros(poly, eps) finds the complex zeros of the
      ++ univariate polynomial poly to precision eps with
      ++ solutions returned as complex floats or rationals
      ++ depending on the type of eps.

  CODE ==> add

    complexZeros(p:UP,eps:Par):List CP ==
      x1:Symbol():=new()
      x2:Symbol():=new()
      vv:Symbol():=new()
      lpf:=factors factor(p)$ComplexFactorization(I,UP)
      ris:List CP:=empty()
      for pf in lpf repeat
          pp:=pf.factor pretend SparseUnivariatePolynomial Complex Integer
          q:PCI :=multivariate(pp,vv)
          q:=eval(q,vv,x1::PCI+complex(0,1)*(x2::PCI))
          p1:=map(real,q)$PolynomialFunctions2(Complex I,I)
          p2:=map(imag,q)$PolynomialFunctions2(Complex I,I)
          lz:=innerSolve([p1,p2],[],[x1,x2],
                          eps)$InnerNumericFloatSolvePackage(I,Par,Par)
          ris:=append([complex(first z,second z) for z in lz],ris)
      ris