View Single Post
  #5   Spotlight this post!  
Unread 02-04-2015, 01:37
Brandon_L Brandon_L is offline
doot doot
AKA: Brandon Liatys
no team
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Newark, NJ
Posts: 1,189
Brandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond reputeBrandon_L has a reputation beyond repute
Re: [TBA]: Incorrect qual points

Converted over to python by a friend

Code:
def sign(x):
    if x > 0:
        return 1
    elif x < 0:
        return -1
    else:
        return 0

def inverf(x):
    a = 0.147
    formula = math.sqrt((math.sqrt((((2 / (math.pi * a)) + ((math.log(1 - x**2)) / 2))**2) - ((math.log(1 - x**2)) / a))) - ((2 / (math.pi * a)) + (math.log(1 - x**2)) / 2))
    return formula*sign(x)

def qual_points(n, r):
    a = 1.07
    formula = math.ceil((inverf((n-(2*r)+2)/(a*n))*(10/(inverf(1/a))))+12)
    return formula
__________________
FRC 2495 - Hamilton West Robotics [2007-2014]
FRC 3929 - Atomic Dragons [2012-2013]

Back for 2017!
Reply With Quote