From 7aa8ac5bc49651808b0fbd38e064a701f509c6aa Mon Sep 17 00:00:00 2001 From: "SCIENCE-RYZEN\\dael" Date: Thu, 18 Oct 2018 21:11:34 +0200 Subject: [PATCH] fix culture errors on erf function constants --- PhaseExplorer/Common.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PhaseExplorer/Common.cs b/PhaseExplorer/Common.cs index f77c9d2..2ca4fad 100644 --- a/PhaseExplorer/Common.cs +++ b/PhaseExplorer/Common.cs @@ -156,18 +156,18 @@ unsafe public static void Copy(Pixbuf dst, byte* src) } } - public static CultureInfo ci = new CultureInfo("en-US"); + public static CultureInfo ci = new CultureInfo("en-US"); // see: https://www.johndcook.com/blog/csharp_erf/ public static double Erf(double x) { // constants - double a1 = Convert.ToDouble("0.254829592", ci); - double a2 = Convert.ToDouble("-0.284496736", ci); - double a3 = Convert.ToDouble("1.421413741", ci); - double a4 = Convert.ToDouble("-1.453152027", ci); - double a5 = Convert.ToDouble("1.061405429", ci); - double p = Convert.ToDouble("0.3275911", ci); + double a1 = Convert.ToDouble("0.254829592", ci); + double a2 = Convert.ToDouble("-0.284496736", ci); + double a3 = Convert.ToDouble("1.421413741", ci); + double a4 = Convert.ToDouble("-1.453152027", ci); + double a5 = Convert.ToDouble("1.061405429", ci); + double p = Convert.ToDouble("0.3275911", ci); // Save the sign of x int sign = 1;