Make sure the scalar and vectorized paths for array.log() return consistent values.
This fixes the behaviour seen in #2565 (closed) where the results for array.log() showed slight differences between 2-element and 4-element arrays.
This applies the same fix used in !805 (merged) which addressed the same issue of different results between the scalar and vectorised paths (for exp)