This file is indexed.

/usr/share/axiom-20170501/src/algebra/D01AQFA.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
)abbrev domain D01AQFA d01aqfAnnaType
++ Author: Brian Dupee
++ Date Created: March 1994
++ Date Last Updated: December 1997
++ References:
++ Dupe95 Using Computer Algebra to Choose and Apply Numerical Routines
++ Dewa92 Using Computer Algebra to Select Numerical Algorithms
++ Description:
++ \axiomType{d01aqfAnnaType} is a domain of
++ \axiomType{NumericalIntegrationCategory}
++ for the NAG routine D01AQF, a general numerical integration routine which
++ can solve an integral of the form 
++ /home/bjd/Axiom/anna/hypertex/bitmaps/d01aqf.xbm
++ The function \axiomFun{measure} measures the usefulness of the routine 
++ D01AQF for the given problem.  The function \axiomFun{numericalIntegration}
++ performs the integration by using \axiomType{NagIntegrationPackage}.

d01aqfAnnaType() : SIG == CODE where

  EF2  ==> ExpressionFunctions2
  EDF  ==> Expression DoubleFloat
  LDF  ==> List DoubleFloat
  SDF  ==> Stream DoubleFloat
  DF  ==> DoubleFloat
  FI  ==> Fraction Integer
  EFI  ==> Expression Fraction Integer
  SOCDF  ==> Segment OrderedCompletion DoubleFloat
  NIA  ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
  MDNIA  ==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
  INT  ==> Integer
  BOP  ==> BasicOperator
  S  ==> Symbol
  ST  ==> String
  LST  ==> List String
  RT  ==> RoutinesTable

  SIG ==> NumericalIntegrationCategory 

  CODE ==> Result add

    Rep:=Result
    import Rep, d01AgentsPackage, NagIntegrationPackage

    measure(R:RT,args:NIA) ==
      ext:Result := empty()$Result
      Den := denominator(args.fn)
      (Den = 1) =>
        [0.0,"d01aqf: A suitable weight function has not been found", ext]
      listOfZeros:LDF := problemPoints(args.fn,args.var,args.range)
      numberOfZeros := (#(listOfZeros))$LDF
      zero?(numberOfZeros) =>
        [0.0,"d01aqf: A suitable weight function has not been found", ext]
      numberOfZeros = 1 =>
        s:SDF := singularitiesOf(args)
        more?(s,1)$SDF => 
          [0.0,"d01aqf: Too many singularities have been found", ext]
        cFloat:Float := (convert(first(listOfZeros)$LDF)@Float)$DF
        cString:ST := (convert(cFloat)@ST)$Float
        lany:Any := coerce(listOfZeros)$AnyFunctions1(LDF)
        ex:Record(key:S,entry:Any) := [d01aqfextra@S,lany]
        ext := insert!(ex,ext)$Result
        [getMeasure(R,d01aqf@S)$RT, "Recommended is d01aqf with the "
          "hilbertian weight function of 1/(x-c) where c = " cString, ext]
      [0.0,"d01aqf: More than one factor has been found and so does not "
                  "have a suitable weight function",ext]

    numericalIntegration(args:NIA,hints:Result) ==
      Args := copy args
      ca:Any :=  coerce(search((d01aqfextra@S),hints)$Result)@Any
      c:DF := first(retract(ca)$AnyFunctions1(LDF))$LDF
      ci:FI := df2fi(c)$ExpertSystemToolsPackage
      Var:EFI := Args.var :: EFI
      Gx:EFI := (Var-(ci::EFI))*(edf2efi(Args.fn)$ExpertSystemToolsPackage)
      ArgsFn := map(x+->convert(x)$FI,Gx)$EF2(FI,Float)
      b:Float:=getButtonValue("d01aqf","functionEvaluations")$AttributeButtons
      fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
      iw:INT := 75*fEvals
      f : Union(fn:FileName,fp:Asp1(G)) := [retract(ArgsFn)$Asp1(G)]
      d01aqf(getlo(Args.range),gethi(Args.range),c,_
             Args.abserr,Args.relerr,4*iw,iw,-1,f)