from prettytable import PrettyTable
import numpy as np

def root_finder():
    a = 1
    b = 1
    crray = np.geomspace(0.1, (10 ** (-200)), num=200, endpoint=False)
    t = PrettyTable(['root1', 'root2', 'root3', 'root4'])
    for c in crray:
        root = np.sqrt((b * b) - (4 * a * c))
        print(root)
        r1 = (-b + root) / (2 * a)
        r2 = (-b - root) / (2 * a)
        r3 = -2 * c / (b + root)
        if b - root == 0:
            r4 = 'div0'
        else:
            r4 = -2 * c / (b - root)
        t.add_row([r1, r2, r3, r4])
    print(t)

if __name__ == '__main__':
    root_finder()
