-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random Generation #82
Comments
The methods for random generation in Arb are currently not wrapped. At some point they might be, but I'm not sure. As you can notice they have the name I can also mention that one simple way to check which methods are wrapped is to check the files in |
@dbai1989 probably the best option now is to @Joel-Dahne I thought that |
I also would be surprised if just using the |
I thought that I would also think that |
@dbai1989 as of #86 you can generate random julia> @btime ArbMatrix(rand(Arb(prec=256), 100,100));
4.085 ms (50007 allocations: 3.21 MiB)
julia> @btime ArbMatrix(rand(Arb, 100,100));
4.507 ms (60005 allocations: 4.27 MiB)
julia> @btime ArbMatrix(rand(BigFloat, 100,100));
2.665 ms (30006 allocations: 2.06 MiB)
julia> @btime ArbMatrix(rand(Float64, 100,100));
175.099 μs (5 allocations: 547.81 KiB)
julia> @btime rand(Arb)
298.833 ns (5 allocations: 336 bytes)
[0.88919508199801528481643321841955846498685775854589236199210746792567750560825 +/- 3.65e-78]
julia> @btime rand(BigFloat)
172.728 ns (3 allocations: 224 bytes)
0.9547999587690397939516420169440272364400015480044632809034564083050837641068108 The positive side of this is that the rng is shared between |
I try to generate random matrices with Arblib. I notice that there is a random generation function in Arb to generate real-valued random matrices:
void arb_mat_randtest(arb_mat_t mat, flint_rand_t state, slong prec, slong mag_bits).
But I don't find its correspondence in Arblib. I have tried Arblib.randtest! and other options. Julia always returns error messages like this: "ERROR: UndefVarError: randtest! not defined".
Does Arblib have a julia wrapper for random generation?
The text was updated successfully, but these errors were encountered: