The sum of sqaures of numbers in [0, 1,000,000) should be 333332833333500000, but the excercise code below gives 584144992.
https://github.com/RichardWarburton/java-8-lambdas-exercises/blob/master/src/main/java/com/insightfullogic/java8/exercises/chapter6/OptimisationExample.java
Should use LongStream and long instead.