Add missing semicolon
Use strict equality checking
Don't use bare fractions
Remove duplicate definition of i