 
 # quantile of t distribution by binary search
 qt = (p, df, hi=5, tol=0.0001) ->
+    p = parseFloat(p)
+    df = parseFloat(df)
     if df <= 0
         console.log("qt: df must be positive")
         return null


# t density
dt = (x, df) ->
    if df <= 0
        console.log("dt: df must be positive")
        return null


# CDF of normal distribution
pnorm = (x, mu=0, sd=1) ->
    x = parseFloat(x)
    mu = parseFloat(mu)
    sd = parseFloat(sd)
    if sd <= 0
        console.log("pnorm: sd must be positive")
        return null
