Results from gpu and sayantan's cpu implementation now match. Removed sqrt from variance calculation.