You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
381 B
16 lines
381 B
import pycarl
|
|
import pycarl.gmp
|
|
|
|
|
|
def example_getting_started_01():
|
|
pycarl.clear_variable_pool()
|
|
x = pycarl.Variable("x")
|
|
y = pycarl.Variable("y")
|
|
pol1 = x * x + pycarl.gmp.Integer(2)
|
|
pol2 = y + pycarl.gmp.Integer(1)
|
|
result = pol1 * pol2
|
|
print("({}) * ({}) = {}".format(pol1, pol2, result))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
example_getting_started_01()
|