File: statistic-private.patch

package info (click to toggle)
imagemagick 8%3A7.1.1.43%2Bdfsg1-1%2Bdeb13u3
  • links: PTS, VCS
  • area: main
  • in suites: trixie-proposed-updates
  • size: 96,160 kB
  • sloc: ansic: 370,601; cpp: 22,835; xml: 11,549; perl: 6,280; sh: 6,203; makefile: 3,484; tcl: 459
file content (31 lines) | stat: -rw-r--r-- 952 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: ImageMagick Packaging Team
 <pkg-gmagick-im-team@lists.alioth.debian.org>
Date: Sun, 7 Sep 2025 16:52:31 +0200
Subject: Private alias for easing backport

origin: backport, https://github.com/ImageMagick/ImageMagick/commit/7e5d87fe6e92b6cc3e96d5175974626317512dd9
---
 MagickCore/statistic-private.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/MagickCore/statistic-private.h b/MagickCore/statistic-private.h
index f873a47..5e84b30 100644
--- a/MagickCore/statistic-private.h
+++ b/MagickCore/statistic-private.h
@@ -29,6 +29,16 @@ static inline double MagickLog10(const double x)
   return(log10(fabs(x)));
 }
 
+static inline double MagickSafeLog10(const double x) {
+  return MagickLog10(x);
+}
+
+static inline double MagickSafeReciprocal(const double x)
+{
+  if ((x > -MagickEpsilon) && (x < MagickEpsilon))
+    return(1.0/MagickEpsilon);
+  return(1.0/x);
+}
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif