ArithFunct/Anastasia9
ArithFunct/kobzevavm
nn1#!/usr/bin/env python2
2# -*- coding: utf-8 -*-
3from math import *
4 
5 
1def SUB(fg):6def SUB(ab):
2    if callable(f) and callable(g):7    if callable(a) and callable(b):
3        def h(x):8        def h(x):
n4            return f(x)-g(x)n9            return a(x) - b(x)
5    if callable(f) and (not callable(g)):10    if callable(a) and not callable(b):
6        def h(x):11        def h(x):
n7            return f(x)-gn12            return a(x) - b
8    if (not callable(f)) and callable(g):13    if not callable(a) and callable(b):
9        def h(x):14        def h(x):
n10            return f-g(x)n15            return - b(x)
11    if (not callable(f)) and (not callable(g)):16    if not callable(a) and not callable(b):
12        def h(x):17        def h(x):
n13            return f-gn18            return - b
14    return h19    return h
1520
1621
n17def DIV(fg):n22def DIV(ab):
18    if callable(f) and callable(g):23    if callable(a) and callable(b):
19        def h(x):24        def h(x):
n20            return f(x)/g(x)n25            return a(x)/b(x)
21    if callable(f) and not callable(g):26    if callable(a) and not callable(b):
22        def h(x):27        def h(x):
n23            return f(x)/gn28            return a(x)/b
24    if (not callable(f)) and callable(g):29    if not callable(a) and callable(b):
25        def h(x):30        def h(x):
n26            return f/g(x)n31            return a/b(x)
27    if (not callable(f)) and (not callable(g)):32    if not callable(a) and not callable(b):
28        def h(x):33        def h(x):
n29            return f/gn34            return a/b
30    return h35    return h
3136
3237
n33def MUL(fg):n38def MUL(ab):
34    if callable(f) and callable(g):39    if callable(a) and callable(b):
35        def h(x):40        def h(x):
n36            return f(x)*g(x)n41            return a(x)*b(x)
37    if callable(f) and not callable(g):42    if callable(a) and not callable(b):
38        def h(x):43        def h(x):
n39            return f(x)*gn44            return a(x)*b
40    if not callable(f) and callable(g):45    if not callable(a) and callable(b):
41        def h(x):46        def h(x):
n42            return f*g(x)n47            return a*b(x)
43    if (not callable(f)) and (not callable(g)):48    if not callable(a) and not callable(b):
44        def h(x):49        def h(x):
n45            return f*gn50            return a*b
46    return h51    return h
4752
4853
n49def ADD(fg):n54def ADD(ab):
50    if callable(f) and callable(g):55    if callable(a) and callable(b):
51        def h(x):56        def h(x):
n52            return f(x)+g(x)n57            return a(x)+b(x)
53    if callable(f) and not callable(g):58    if callable(a) and not callable(b):
54        def h(x):59        def h(x):
n55            return f(x)+gn60            return a(x)+b
56    if not callable(f) and callable(g):61    if not callable(a) and callable(b):
57        def h(x):62        def h(x):
n58            return f+g(x)n63            return a+b(x)
59    if (not callable(f)) and (not callable(g)):64    if not callable(a) and not callable(b):
60        def h(x):65        def h(x):
t61            return f+gt66            return a+b
62    return h67    return h
6368
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op