You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-i18n/sunpinyin/files/sunpinyin-2.0.4-gcc-6.patch

22 lines
959 B

https://bugs.gentoo.org/553796
Author: Peter Levine <plevine457@gmail.com>
--- a/src/slm/tslmpack/common.h
+++ b/src/slm/tslmpack/common.h
@@ -53,10 +53,10 @@
typedef std::map<float, int> RealIndexMap; // map real values to their indices
typedef std::map<std::string, unsigned int> TLexicon; // map word to wid
-#define EffectivePr(a) (float((usingLogPr) ? ((a) / log(2.0)) : (-log2((a)))))
-#define OriginalPr(b) (float((usingLogPr) ? ((b) * log(2.0)) : (exp2(-(b)))))
-#define EffectiveBow(a) (float((usingLogPr) ? (exp(-(a))) : ((a))))
-#define OriginalBow(b) (float((usingLogPr) ? (-log((b))) : ((b))))
+#define EffectivePr(a) (float((usingLogPr) ? ((a) / logf(2.0f)) : (-log2f((a)))))
+#define OriginalPr(b) (float((usingLogPr) ? ((b) * logf(2.0f)) : (exp2f(-(b)))))
+#define EffectiveBow(a) (float((usingLogPr) ? (expf(-(a))) : ((a))))
+#define OriginalBow(b) (float((usingLogPr) ? (-logf((b))) : ((b))))
#endif //_SLM_PACK_COMMON_H