From 53374af29939dec0ea201c5dd010c05fc34413c2 Mon Sep 17 00:00:00 2001 From: ACKERMANNGUE <gawen.ackermann@etu.hesge.ch> Date: Thu, 9 Dec 2021 11:18:06 +0100 Subject: [PATCH] modif init bachet bezout --- .vscode/settings.json | 6 ++++++ polynomial.py | 19 +++++-------------- 2 files changed, 11 insertions(+), 14 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..ef78898 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.associations": { + "*.bin": "code-text-binary", + "string.h": "c" + } +} \ No newline at end of file diff --git a/polynomial.py b/polynomial.py index 6ea1a7d..3bb3730 100644 --- a/polynomial.py +++ b/polynomial.py @@ -94,21 +94,12 @@ class Polynomial: def compute_bachet_bezout(a, b): - r = [] - x = [] - y = [] - q = [] - # Init - r.append(a) - x.append(1) - y.append(0) - q.append(0) - - r.append(b) - x.append(0) - y.append(1) - q.append(0) + + r = [a, b] + x = [1, 0] + y = [0, 1] + q = [0, 0] # Computing i = 1 -- GitLab