Java8 introduced the notion of streams that is a new data structure and supports multi-core processors. When the sum method is called for a stream of floating-point numbers, the summation is calculated at high-speed by applying MapReduce, which distributes computations to cores. However, since floating-point calculation causes an error, simple adaptation of this method can not determine the result uniquely. Then, in this study, we develop a summation program that can be applied to a stream with MapReduce. Our method can calculate at high-speed with keeping correctly rounded.
['Naoshi Sakamoto']
Parallel online exact sum for Java8