This file is indexed.

/usr/share/octave/packages/symbolic-2.2.4/doc-cache is in octave-symbolic 2.2.4-1.

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
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
# doc-cache created by Octave 4.0.0
# name: cache
# type: cell
# rows: 3
# columns: 15
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
assumptions


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1257
 -- Function File: A = assumptions ()
 -- Function File: A = assumptions (X)
 -- Function File: [V, D] = assumptions (X, 'dict')
 -- Function File: L = assumptions ('possible')
     List assumptions on symbolic variables.

     The assumptions are returned as a cell-array of strings:
          >> syms x y positive
          >> syms n integer
          >> assumptions
             ⇒ ans =
               {
                 [1,1] = n: integer
                 [1,2] = x: positive
                 [1,3] = y: positive
               }
          >> f = sin(n*x);
          >> assumptions(f)
             ⇒ ans =
               {
                 [1,1] = n: integer
                 [1,2] = x: positive
               }
          >> assumptions(n)
             ⇒ ans =
               {
                 [1,1] = n: integer
               }

     With the optional second argument set to the string ‘'dict'’,
     return the assumption dictionaries in D corresponding to the
     variables in V.

     You can also get a list of possible assumptions:
          >> A = assumptions('possible');
          >> sprintf('%s ', A{:})
             ⇒ ans = real positive negative integer even odd rational finite

     See also: sym, syms, assume, assumeAlso.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
List assumptions on symbolic variables.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
bernoulli


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 448
 -- Function File: B = bernoulli (N)
 -- Function File: P = bernoulli (N, X)
     Return Bernoulli numbers and polynomials.

     Examples:
          >> bernoulli(6)
             ⇒ (sym) 1/42
          >> bernoulli(7)
             ⇒ (sym) 0

     Polynomial example:
          >> syms x
          >> bernoulli(2, x)
             ⇒ (sym)
                 2       1
                x  - x + ─
                         6

     See also: euler.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Return Bernoulli numbers and polynomials.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
catalan


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 170
 -- Function File: catalan ()
     Return Catalan constant.

          vpa (catalan ())
          ⇒ (sym) 0.91596559417721901505460351493238

     See also: eulergamma.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
Return Catalan constant.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
digits


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 479
 -- Function File: N = digits ()
 -- Function File: digits (N)
 -- Function File: OLDN = digits (N)
     Get/set number of digits used in variable precision arith.

     Examples:
          >> n_orig = digits(7);
          >> vpa('pi')
             ⇒ (sym) 3.141593

          >> digits(42)
          >> vpa('pi')
             ⇒ (sym) 3.14159265358979323846264338327950288419717

          >> digits(n_orig)   # reset digits to saved value

     See also: sym, vpa, vpasolve.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Get/set number of digits used in variable precision arith.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
eulergamma


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 182
 -- Function File: eulergamma ()
     Return Euler-Mascheroni constant.

          vpa (eulergamma ())
          ⇒ (sym) 0.57721566490153286060651209008240

     See also: catalan.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Return Euler-Mascheroni constant.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
evalpy


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2327
 -- Function File: evalpy (CMD)
 -- Function File: evalpy (CMD, X, Y, …)
     Run Python code, automatically transferring results.

     Examples:
          >> x = -4;
          >> evalpy ('y = 2*x', x)
             ⇒ y = -8
          >> y
             ⇒ y = -8

     You can replace ‘x’ with a new value in the Python code:
          >> syms x
          >> evalpy ('y = 3*x; x = -1.5; z = x**2', x)
             ⇒
               x = -1.5000
               y = (sym) 3⋅x
               z =  2.2500

     All arguments can be accessed as ‘i0’, ‘i1’, etc.  This is useful
     if they don’t have inputnames:
          >> x = 10;
          >> evalpy ('y = ", ".join( (str(x),str(i0),str(i1)) )', x, 5)
             ⇒ y = 10.0, 10.0, 5.0

     If you need a variable in Python but don’t want it passed back to
     Octave, put an ‘_’ (underscore) at the beginning or end.
          >> x = 20;
          >> evalpy ('_y = 3*x; z_ = _y/6; my = z_/2;', x)
             ⇒ Variables effected: my
          >> _y
             ⇒ ??? '_y' undefined near line 1 column 1
          >> z_
             ⇒ ??? 'z_' undefined near line 1 column 1

     The final few characters of CMD effect the verbosity:
        • 2 semicolons ‘;;’, very quiet, no output.
        • 1 semicolon ‘;’, a one-line msg about variables assigned.
        • no semicolon, display each variable assigned.

     Multiline code should be placed in a cell array, see the
     ‘python_cmd’ documentation.

     Warning: evalpy is probably too smart for its own good.  It is
     intended for interactive use.  In your non-interactive code, you
     might want ‘python_cmd’ instead.

     Notes:
        • if you assign to X but don’t change its value, it will not be
          assigned to and will not appear in the Variables effected:"
          list.
        • using print is probably a bad idea.  For now, use ‘dbout(x)’
          to print ‘x’ to stderr which should appear in the terminal
          (FIXME: currently broken on windows).
        • evalpy is a bit of a work-in-progress and subject to change.
          For example, with a proper IPC mechanism, you could grab the
          values of X etc when needed and not need to specify them as
          args.

     See also: python_cmd.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Run Python code, automatically transferring results.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
fibonacci


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 505
 -- Function File: F = fibonacci (N)
 -- Function File: P = fibonacci (N, X)
     Return Fibonacci numbers and polynomials.

     Examples:
          >> fibonacci(15)
             ⇒ (sym) 610
          >> syms n
          >> fibonacci(n)
             ⇒ (sym) fibonacci(n)

     Polynomial example:
          >> syms x
          >> fibonacci(10, x)
             ⇒ (sym)
                9      7       5       3
               x  + 8⋅x  + 21⋅x  + 20⋅x  + 5⋅x

     See also: euler, bernouilli.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Return Fibonacci numbers and polynomials.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
findsymbols


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 800
 -- Function File: L = findsymbols (X)
     Return a list (cell array) of the symbols in an expression.

     The list is sorted alphabetically.  *Note symvar::, for details.

     If two variables have the same symbol but different assumptions,
     they will both appear in the output.  It is not well-defined in
     what order they appear.

     X could be a sym, sym array, cell array, or struct.

          >> syms x y z
          >> C = {x, 2*x*y, [1 x; sin(z) pi]};
          >> findsymbols (C)
             ⇒
               {
                 (sym) x
                 (sym) y
                 (sym) z
               }

     Note E, I, pi, etc are not counted as symbols.

     Note only returns symbols actually appearing in the RHS of a
     ‘symfun’.

     See also: symvar, findsym.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
Return a list (cell array) of the symbols in an expression.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
octsympy_tests


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 452
 -- Function File: R = octsympy_tests ()
     Run the OctSymPy tests, log results, and return true if passing.

     I threw this together by modifying "__run_test_suite__.m" which is
     Copyright (C) 2005-2013 David Bateman and part of GNU Octave, GPL
     v3.

     FIXME: once we no longer try to support Octave 3.6, drop most of
     this and call "__run_test_suite({'@sym', '@symfun'}, {})" instead.
     See https://savannah.gnu.org/bugs/?41215


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
Run the OctSymPy tests, log results, and return true if passing.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
poly2sym


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 725
 -- Function File: P = poly2sym (C)
 -- Function File: P = poly2sym (C, X)
     Create a symbolic polynomial expression from coefficients.

     If X is not specified, the free variable is set to ‘x’.  C may be a
     vector of doubles or syms.  It can also be a cell array vector.  X
     may be a symbolic expression or something that converts to one.
     The coefficients correspond to decreasing exponent of the free
     variable.

     Example:
          x = sym ('x');
          y = sym ('y');
          poly2sym ([2 5])
             ⇒ (sym) 2⋅x + 5
          poly2sym ({2*y 5 -3}, x)
             ⇒ (sym)
                   2
                2⋅x ⋅y + 5⋅x - 3

     See also: sym2poly, polyval, roots.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Create a symbolic polynomial expression from coefficients.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
python_cmd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2821
 -- Function File: [A, B, …] = python_cmd (CMD, X, Y, …)
     Run some Python command on some objects and return other objects.

     Here CMD is a string of Python code.  Inputs X, Y, … can be a
     variety of objects (possible types listed below).  Outputs A, B, …
     are converted from Python objects: not all types are possible, see
     below.

     Example:
          >> x = 10; y = 2;
          >> cmd = '(x,y) = _ins; return (x+y,x-y)';
          >> [a, b] = python_cmd (cmd, x, y)
             ⇒ a =  12
             ⇒ b =  8

     The inputs will be in a list called ’_ins’.  The command should end
     by outputing a tuple of return arguments.  If you have just one
     return value, you probably want to append an extra comma.  Either
     of these approaches will work:
          >> cmd = '(x,y) = _ins; return (x+y,)';
          >> a = python_cmd (cmd, x, y)
             ⇒ a =  12
          >> cmd = '(x,y) = _ins; return x+y,';
          >> a = python_cmd (cmd, x, y)
             ⇒ a =  12
     (Python gurus will know why).

     Instead of ‘return’, you can append to the Python list ‘_outs’:
          >> cmd = '(x,y) = _ins; _outs.append(x**y)';
          >> a = python_cmd (cmd, x, y)
             ⇒ a =  100

     You can also pass a cell-array of lines of code.  But be careful
     with whitespace: its Python!
          >> cmd = { '(x,) = _ins'
          ..         'if x.is_Matrix:'
          ..         '    return (x.T,)'
          ..         'else:'
          ..         '    return (x,)' };
     The cell array can be either a row or a column vector.  Each of
     these strings probably should not have any newlines (other than
     escaped ones e.g., inside strings).  An exception might be Python
     triple-quoted """ multiline strings """.  FIXME: test this.  It
     might be a good idea to avoid blank lines as they can cause
     problems with some of the IPC mechanisms.

     Possible input types:
        • sym objects
        • strings (char)
        • scalar doubles
     They can also be cell arrays of these items.  Multi-D cell arrays
     may not work properly.

     Possible output types:
        • SymPy objects (Matrix and Expr at least)
        • int
        • float
        • string
        • unicode strings
        • bool
        • dict (converted to structs)
        • lists/tuples (converted to cell vectors)
     FIXME: add a py_config to change the header?  The python
     environment is defined in python_header.py.  Changing it is
     currently harder than it should be.

     Note: if you don’t pass in any syms, this shouldn’t need SymPy.
     But it still imports it in that case.  If you want to run this w/o
     having the SymPy package, you’d need to hack a bit.

     See also: evalpy.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Run some Python command on some objects and return other objects.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
sympref


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3754
 -- Function File: R = sympref ()
 -- Function File: R = sympref (CMD)
 -- Function File: sympref CMD
 -- Function File: sympref CMD ARGS
     Preferences for the OctSymPy symbolic computing package.

     ‘sympref’ can set or get various preferences and configurations.
     The various choices for CMD and ARGS are documented below.

     *Python executable* path/command:
          >> sympref python '/usr/bin/python'       >> sympref python 'C:\Python\python.exe'  >> sympref python 'N:\myprogs\py.exe'     
     Default is an empty string; in which case OctSymPy just runs
     ‘python’ and assumes the path is set appropriately.

     *Display* of syms:
          >> sympref display
             ⇒ ans = unicode
          >> syms x
          >> sympref display flat
          >> sin(x/2)
             ⇒ (sym) sin(x/2)

          >> sympref display ascii
          >> sin(x/2)
             ⇒ (sym)
                       /x\
                    sin|-|
                       \2/

          >> sympref display unicode
          >> sin(x/2)
             ⇒ (sym)
                       ⎛x⎞
                    sin⎜─⎟
                       ⎝2⎠

          >> sympref display default
     By default OctSymPy uses the unicode pretty printer to display
     symbolic expressions.  If that doesn’t work (e.g., if you see ‘?’
     characters) then try the ‘ascii’ option.

     *Communication mechanism*:
          >> sympref ipc
             ⇒ ans = default
     The default will typically be the ‘popen2’ mechanism which uses a
     pipe to communicate with Python and should be fairly fast.  If that
     doesn’t work, try ‘sympref display system’ which is much slower, as
     a new Python process is started for each operation (many commands
     use more than one operation).  Other options for ‘sympref ipc’
     include:
        • ‘sympref ipc popen2’: force popen2 choice (e.g., on Matlab
          were it would not be the default).
        • ‘sympref ipc system’: construct a long string of the command
          and pass it directly to the python interpreter with the
          ‘system()’ command.  This typically assembles a multiline
          string for the commands, except on Windows where a long
          one-line string is used.
        • ‘sympref ipc systmpfile’: output the python commands to a
          ‘tmp_python_cmd.py’ file and then call that [for debugging,
          may not be supported long-term].
        • ‘sympref ipc sysoneline’: put the python commands all on one
          line and pass to ‘python -c’ using a call to ‘system()’.  [for
          debugging, may not be supported long-term].

     *Reset*: reset the SymPy communication mechanism.  This can be
     useful after an error occurs and the connection with Python becomes
     confused.
          >> sympref reset     

     *Snippets*: when displaying a sym object, we quote the SymPy
     representation (or a small part of it):
          >> syms x
          >> y = [pi x];
          >> sympref snippet on
          >> y
             ⇒ y = (sym 1×2 matrix)       “...([[pi, Symbol('x')]])”
                 [π  x]
          >> sympref snippet off
          >> y
             ⇒ y = (sym) [π  x]  (1×2 matrix)
          >> sympref snippet default

     *Default precision*: control the number of digits used by
     variable-precision arithmetic (see also the *note digits::
     command).
          >> sympref digits          % get
             ⇒ ans = 32
          >> sympref digits 64       % set
          >> sympref digits default

     Report the *version* number:
          >> sympref version
             ⇒ 2.2.4

     See also: sym, syms.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Preferences for the OctSymPy symbolic computing package.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
syms


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1337
 -- Function File: syms X
 -- Function File: syms X Y …
 -- Function File: syms F(X)
 -- Function File: syms X ASM
 -- Function File: syms X ASM ASM2 …
 -- Function File: syms
     Create symbolic variables and symbolic functions.

     This is a convenience function.  For example:
          >> syms x y z
     instead of:
          >> x = sym('x');
          >> y = sym('y');
          >> z = sym('z');

     The last arguments can provide one or more assumptions (type or
     restriction) on the variable (*note sym::).
          >> syms x y z positive
          >> syms n positive even

     Symfuns represent abstract or concrete functions.  Abstract symfuns
     can be created with ‘syms’:
          >> syms f(x)
     If ‘x’ does not exist in the callers workspace, it is created as a
     *side effect* in that workspace.

     Called without arguments, ‘syms’ displays a list of all symbolic
     functions defined in the current workspace.

     Caution: On Matlab, you may not want to use ‘syms’ within
     functions.  In particular, if you shadow a function name, you may
     get hard-to-track-down bugs.  For example, instead of writing ‘syms
     alpha’ use ‘alpha = sym('alpha')’ in functions.
     [https://www.mathworks.com/matlabcentral/newsreader/view_thread/237730]

     See also: sym.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Create symbolic variables and symbolic functions.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
vpa


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 697
 -- Function File: Y = vpa (X)
 -- Function File: Y = vpa (X, N)
     Create a variable-precision floating point number.

     X can be a string, a sym or a double.  Example:
          >> x = vpa('1/3', 32)
             ⇒ x = (sym) 0.33333333333333333333333333333333
          >> a = sym(1)/3;
          >> x = vpa(a, 32)
             ⇒ x = (sym) 0.33333333333333333333333333333333

     Be careful when creating a high-precision float from a double as
     you will generally only get 15 digits:
          >> vpa(1/3, 32)
             ⇒ (sym) 0.33333333333333331482961625624739

     If N is omitted it defaults to the current value of ‘digits()’.

     See also: sym, vpasolve, digits.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Create a variable-precision floating point number.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
vpasolve


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 458
 -- Function File: Y = vpasolve (E)
 -- Function File: Y = vpasolve (E, X)
 -- Function File: Y = vpasolve (E, X, X0)
     Numerical solution of a symbolic equation.

     Variable-precision numerical solution of the equation E for
     variable X using initial guess of X0.

     Example:
          >> syms x
          >> eqn = exp(x) == x + 2;
          >> vpasolve(eqn, x, 0.1)
             ⇒ (sym) 1.1461932206205825852370610285214

     See also: vpa.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Numerical solution of a symbolic equation.