Skip to content

Commit

Permalink
fix: bernoulli thread safe
Browse files Browse the repository at this point in the history
  • Loading branch information
tk-yoshimura committed Nov 22, 2024
1 parent ad8e3dd commit 900bc34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions DoubleDouble/DDouble/DDouble_bernoullipoly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ public static ReadOnlyCollection<ddouble> Table(int n, bool centered) {
}

lock (table) {
ReadOnlyCollection<ddouble> coefs = GenerateTable(n, centered);
table.Add(coefs);
for (int k = table.Count; k <= n; k++) {
ReadOnlyCollection<ddouble> coefs = GenerateTable(k, centered);
table.Add(coefs);
}

return table[n];
}
Expand Down
2 changes: 1 addition & 1 deletion DoubleDouble/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

[assembly: Guid("9A19103F-16F7-4668-BE54-9A1E7A4F7556")]

[assembly: AssemblyVersion("4.2.5.*")]
[assembly: AssemblyVersion("4.2.6.*")]

[assembly: InternalsVisibleTo("DoubleDoubleTest")]
[assembly: InternalsVisibleTo("DoubleDoubleSandbox")]

0 comments on commit 900bc34

Please sign in to comment.