Skip to content

Commit

Permalink
put back normal precision, inserted the rec Vnk in robust Pkn and imp…
Browse files Browse the repository at this point in the history
…roved readme
  • Loading branch information
konkam committed Oct 7, 2020
1 parent e5391b4 commit 85b908c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ p = R"$to_plot %>%
theme_bw() +
scale_fill_gradient(name = 'Accuracy') +
ggtitle('Vnk')"
R"png('Vnk_instability.png')
R"png('figures/Vnk_instability.png')
plot($p)
dev.off()"
```

![](Vnk_instability.png)
![](figures/Vnk_instability.png)

Accuracy (bits) of the computed $V_{n,k}$ as a function of $n$ and $k$. The computations are carried out using 200 bits of precision. Light coloured areas correspond to where the precision decreases below 64 bits.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ References:

## Instability of the $V_{n,k}$

````julia

using GibbsTypePriors, Nemo, DataFrames, DataFramesMeta, RCall
β = 0.5
Expand All @@ -167,6 +168,9 @@ R"png('Vnk_instability.png')
dev.off()"
````

![](Vnk_instability.png)



![](Vnk_instability.png)

Accuracy (bits) of the computed $V_{n,k}$ as a function of $n$ and $k$. The computations are carried out using 200 bits of precision. Light coloured areas correspond to where the precision decreases below 64 bits.
File renamed without changes
2 changes: 1 addition & 1 deletion src/Pkn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Pkn_NGG_robust_in(k, n, β, σ; verbose = false)
return arb_0
else
σ_arb = RR(σ)
Vnk_NGG(n, k, β, σ) // σ_arb^k * Cnk_robust(n, k, σ; verbose = verbose)
Vnk_NGG_rec(n, k, β, σ) // σ_arb^k * Cnk_robust(n, k, σ; verbose = verbose)
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/common_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using SpecialFunctions, Nemo, StatsFuns, Memoization
import Nemo.binom, Nemo.gamma

"Session-wide precision"
const prec = 200 ## Increase for better precision
const prec = 5000 ## Increase for better precision

"Converter from real to arbitrary precision real (Arb)"
const RR = RealField(prec)
Expand Down

0 comments on commit 85b908c

Please sign in to comment.