Ask Your Question

RuudH's profile - activity

2024-02-20 00:29:27 +0200 asked a question Could FLINT/ARB-functions be run multi-threaded under Sage?

Could FLINT/ARB-functions be run multi-threaded under Sage? A number of FLINT/ARB functions, for instance the integral,

2024-02-18 23:20:42 +0200 edited answer Ghost numbers when using ARB

This is not an answer, but a possible clue that it is a problem of ARB and not the SageMath wrapper. When I run this co

2024-02-18 23:17:21 +0200 received badge  Commentator
2024-02-18 23:17:21 +0200 commented answer Ghost numbers when using ARB

Super! That does the trick :-)

2024-02-18 23:17:16 +0200 marked best answer Ghost numbers when using ARB

Maybe a very naive question, but when I code something like:

RDD=RealBallField(256)
RDD(3.1)*RDD(2.1)

I obtain:

[6.510000000000000461852778244065128704839826135899304117285652827862296732064351 +/- 9.03e-80]

as the output. Where does all the noise after the 15th digit come from and how could I get rid of it?

Or am I not allowed to increase the accuracy above 53 when using ARB in SageMath?

2024-02-18 19:57:06 +0200 answered a question Ghost numbers when using ARB

This is not an answer, but a possible clue that it is a problem of ARB and not the SageMath wrapper. When I run this co

2024-02-18 18:34:12 +0200 edited question Ghost numbers when using ARB

Ghost numbers when using ARB Maybe a very naive question, but when I code something like: RDD=RealBallField(256) RDD(3.

2024-02-18 18:28:33 +0200 edited question Ghost numbers when using ARB

Ghost numbers when using ARB Maybe a very naive question, but when I code something like: RDD=RealBallField(256) RDD(3.

2024-02-18 18:28:33 +0200 received badge  Editor (source)
2024-02-18 18:27:56 +0200 asked a question Ghost numbers when using ARB

Ghost numbers when using ARB Maybe a very naive question, but when I code something like: RDD=RealBallField(256) RDD(3.

2024-02-18 18:21:14 +0200 received badge  Notable Question (source)
2023-07-25 08:22:11 +0200 received badge  Famous Question (source)
2023-07-23 07:56:26 +0200 received badge  Famous Question (source)
2022-01-28 08:53:59 +0200 received badge  Notable Question (source)
2022-01-28 08:53:59 +0200 received badge  Popular Question (source)
2020-11-10 17:20:21 +0200 received badge  Notable Question (source)
2020-11-10 17:20:21 +0200 received badge  Popular Question (source)
2020-10-02 13:57:29 +0200 received badge  Popular Question (source)
2018-09-26 19:16:52 +0200 asked a question Latex commands \lfloor and \lceil work, but their counterparts won't.

Encountered a strange problem when using latex in the titles, labels or legends of plots:

a=point2d(xy, title="$\lceil x \lfloor$")

works fine (xy contains a list of points), however:

a=point2d(xy, title="$\rceil x \rfloor$")

gives an error (whatever combination I try). The same happens in the legends and axis labels.

Am I doing something wrong here or is this a bug in latex in the plot texts?

2018-03-29 15:25:31 +0200 commented answer Is it possible to use Arb-library commands directly in Sagemath?

Hey, hey, hey... :-) It does work indeed. Sagemath continues to impress me! I am actually aiming to code the Riemann Xi function (s=x+iy):

s/2*(s-1)*pi^(-s/2)*gamma(s/2)*zeta(s)

using complex Ballfields only.

Thanks B r u n o !

EDIT: Here is the 'ball' code for the Riemann Xi function. It is super fast (e.g. compared to pari)

x=1/3;y=200000
z  = CBF(x,y)
z2 = z/RBF(2)
n1 = RBF(1)
K  = z2*(z-n1)*RBF(pi)^(RBF(-1)*z2)*z2.gamma()*z.zeta()
CIF(K)
2018-03-29 13:54:32 +0200 commented answer Is it possible to use Arb-library commands directly in Sagemath?

Thanks Bruno. This is very helpful! I can now use functions like gamma and zeta as a CBF.method, however could not find how to e.g. add or multiply two CBF's together and get a new CBF, i.e. the basic algebra you could do in Arb doesn't seem to be supported (yet), right?

2018-03-29 00:43:30 +0200 asked a question Is it possible to use Arb-library commands directly in Sagemath?

I would like to use some commands/functions from the high performance/precision Arb-library that in turn builds on the Flint-library. Searching the web, I did find references that some commands from both libraries already underpin directly or indirectly the Sagemath environment, however basic commands like for instance:

arb.pi()

don't seem to be supported (or better, I couldn't get them to work yet).

What I am after is to use Flint and Arb functions within Python like in this example, but then under the Sagemath umbrella. Is this already possible?

Thanks.

2018-03-29 00:27:26 +0200 commented answer Using multiple lines of pari/gp code in a Sage notebook

You're a star, @slelievre! It works perfectly and performs exactly as I wanted. In a dedicated pari-file the loops now function properly. I would have never figured this out myself.

2018-03-27 12:56:04 +0200 commented answer Using multiple lines of pari/gp code in a Sage notebook

@slelievre. Thanks for the detailed explanation. I have followed the instructions but unfortunately end up with an error (see screenshot attached). It seems that the limit.h file can't be found on my machine. Do you have an idea on how to resolve this? https://ibb.co/g2UZ77

2018-03-26 15:50:29 +0200 commented answer Using multiple lines of pari/gp code in a Sage notebook

Thanks for your response! I will try that out, but would appreciate some coaching. I have installed Sage/Jupyter notebook on a MAC and am not sure where exactly I have to type the command $ sage -i pari_jupyter. Is this on the command prompt (Terminal)?

2018-03-26 14:14:18 +0200 received badge  Nice Question (source)
2018-03-25 22:58:41 +0200 asked a question Using multiple lines of pari/gp code in a Sage notebook

I am struggling to get multiple lines of pari/gp code working in a Jupyter Sage notebook.

When I enter:

%%gp
for(x=1,10,print(x))

it all works fine, however when I for instance write:

%%gp
for(x=1,10,{
    print(x);
})

the system just 'hangs' and doesn't return any output. The same issue occurs in the Cocalc Sage cloud environment. I also tried 'pari/gp in your browser' and there it works fine.

Am I doing something wrong or isn't the multi-line pari/gp option supported in Sage?

2018-03-01 20:38:07 +0200 marked best answer The use of %gp to switch to Pari/gp commands

I am using Sagemath 8.0 on my computer and also have subscribed to Cocalc (the former Sagemathcloud). I currently do quite a bit of programming in Pari/gp and noted that using %gp in the Cocalc-cloud allows me to switch to entering a sequence of Pari/gp commands, however this doesn't seem to work for the PC-version I use. Of course I can circumvent this by transforming each Pari/gp command into a string with pari(' .... '), however that can only be done line by line and produces ugly code.

Is it correct that %gp doesn't work on the PC version and if so, is there another way to write multiple lines of Pari/gp code other than producing line by line strings and/or use the terminal?

Thanks.