modify to use only 32 bit in calculation

the extrema test is even less significant than it was before,
but I do not think that something close to any extrema test
will happen in reality so I do not mind to change the expected
result that much.

For other tests some expected values have changed one or a few
digits which is fine I think since this is in the range of noise.
cleanup
cleanup