import os
def read_numbers_from_file(filename):
    numbers = []
    with open(os.getcwd()+ '/TEMA8/' + filename, 'r') as file:
        for line in file:
            elements = line.strip().split()
            for element in elements:
                if element:
                    numbers.append(float(element))
    return numbers