Commit 23cfa27a8 for imagemagick.org

commit 23cfa27a8e0016cee0cc51402f3e980b55d2cf6f
Author: Cristy <urban-warrior@imagemagick.org>
Date:   Mon Jul 6 14:48:45 2026 -0400

    improve formatting

diff --git a/MagickWand/compare.c b/MagickWand/compare.c
index f5483e218..b58a97c55 100644
--- a/MagickWand/compare.c
+++ b/MagickWand/compare.c
@@ -1327,9 +1327,14 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info,
           {
             case AbsoluteErrorMetric:
             {
-              (void) FormatLocaleFile(stderr,"%.20g (%.20g)",distortion,
-                distortion/scale);
-              break;
+              if (distortion == (long long) distortion)
+                {
+                  (void) FormatLocaleFile(stderr,"%.20g (%.20g)",distortion,
+                    distortion/scale);
+                  break;
+                }
+              (void) FormatLocaleFile(stderr,"%.*g (%.*g)",GetMagickPrecision(),
+                distortion,GetMagickPrecision(),distortion/scale);
             }
             case MeanErrorPerPixelErrorMetric:
             {