File: functions.py

package info (click to toggle)
sympy 1.13.3-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 36,612 kB
  • sloc: python: 453,064; xml: 359; makefile: 161; sh: 59; lisp: 4
file content (27 lines) | stat: -rwxr-xr-x 394 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/env python

"""Functions example

Demonstrates functions defined in SymPy.
"""

from sympy import pprint, Symbol, log, exp

def main():
    a = Symbol('a')
    b = Symbol('b')
    e = log((a + b)**5)
    print()
    pprint(e)
    print('\n')

    e = exp(e)
    pprint(e)
    print('\n')

    e = log(exp((a + b)**5))
    pprint(e)
    print()

if __name__ == "__main__":
    main()