def frange(start, end, step, rnd = 5):
    """Generate a range with float values"""
    result = []

    # invert step and change start/end when positions are inverted
    if start > end:
        return(frange(end, start, step*-1))

    if step > 0:
        point = start
        while point <= end:
            result.append(point)
            point =round(point + step,rnd)
    # for negative steps
    else:
        point = end
        while point >= start:
            result.append(point)
            point =round(point + step,rnd)

    return result