ArithFunct/kobzevavm
ArithFunct/Anastasia9
n1#!/usr/bin/env python2n
2# -*- coding: utf-8 -*-
3from math import *
4 
5 
6def SUB(ab):1def SUB(fg):
7    if callable(a) and callable(b):2    if callable(f) and callable(g):
8        def h(x):3        def h(x):
n9            return a(x) - b(x)n4            return f(x)-g(x)
10    if callable(a) and not callable(b):5    if callable(f) and (not callable(g)):
11        def h(x):6        def h(x):
n12            return a(x) - bn7            return f(x)-g
13    if not callable(a) and callable(b):8    if (not callable(f)) and callable(g):
14        def h(x):9        def h(x):
n15            return - b(x)n10            return f-g(x)
16    if not callable(a) and not callable(b):11    if (not callable(f)) and (not callable(g)):
17        def h(x):12        def h(x):
n18            return - bn13            return f-g
19    return h14    return h
2015
2116
n22def DIV(ab):n17def DIV(fg):
23    if callable(a) and callable(b):18    if callable(f) and callable(g):
24        def h(x):19        def h(x):
n25            return a(x)/b(x)n20            return f(x)/g(x)
26    if callable(a) and not callable(b):21    if callable(f) and not callable(g):
27        def h(x):22        def h(x):
n28            return a(x)/bn23            return f(x)/g
29    if not callable(a) and callable(b):24    if (not callable(f)) and callable(g):
30        def h(x):25        def h(x):
n31            return a/b(x)n26            return f/g(x)
32    if not callable(a) and not callable(b):27    if (not callable(f)) and (not callable(g)):
33        def h(x):28        def h(x):
n34            return a/bn29            return f/g
35    return h30    return h
3631
3732
n38def MUL(ab):n33def MUL(fg):
39    if callable(a) and callable(b):34    if callable(f) and callable(g):
40        def h(x):35        def h(x):
n41            return a(x)*b(x)n36            return f(x)*g(x)
42    if callable(a) and not callable(b):37    if callable(f) and not callable(g):
43        def h(x):38        def h(x):
n44            return a(x)*bn39            return f(x)*g
45    if not callable(a) and callable(b):40    if not callable(f) and callable(g):
46        def h(x):41        def h(x):
n47            return a*b(x)n42            return f*g(x)
48    if not callable(a) and not callable(b):43    if (not callable(f)) and (not callable(g)):
49        def h(x):44        def h(x):
n50            return a*bn45            return f*g
51    return h46    return h
5247
5348
n54def ADD(ab):n49def ADD(fg):
55    if callable(a) and callable(b):50    if callable(f) and callable(g):
56        def h(x):51        def h(x):
n57            return a(x)+b(x)n52            return f(x)+g(x)
58    if callable(a) and not callable(b):53    if callable(f) and not callable(g):
59        def h(x):54        def h(x):
n60            return a(x)+bn55            return f(x)+g
61    if not callable(a) and callable(b):56    if not callable(f) and callable(g):
62        def h(x):57        def h(x):
n63            return a+b(x)n58            return f+g(x)
64    if not callable(a) and not callable(b):59    if (not callable(f)) and (not callable(g)):
65        def h(x):60        def h(x):
t66            return a+bt61            return f+g
67    return h62    return h
6863
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op