Fix issue 12183 : Use double instead of real to avoid valgrind's abort