A floating-gate analog memory device for neural networks