Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
let z = 0, n, d, i, a
if ((i = f.indexOf(' ')) != -1) {
z = parseInt(f.substring(0, i))
f = f.substring(++i).trim()
}
i = f.indexOf('/')
n = parseInt(f.substring(0, i))
d = parseInt(f.substring(++i))
a = z + (n / d)
a = f.split.map(&:to_r).sum.to_f