sync with 585199b0a8aea5e7620966166560cb69b83777fd

bugfix in output_double