Ask Your Question

ytum's profile - activity

2019-09-29 20:34:09 +0200 commented answer Set global RealNumber precision in .sage file

Thanks a lot, this makes perfect sense! The way I was running the script was with sage "my_script.sage" directly in the linux commandline, but that logically enough also preparses before execution.

2019-09-29 20:30:51 +0200 received badge  Scholar (source)
2019-09-29 20:30:48 +0200 received badge  Supporter (source)
2019-09-29 14:22:25 +0200 received badge  Nice Question (source)
2019-09-29 13:44:24 +0200 received badge  Student (source)
2019-09-29 13:38:57 +0200 asked a question Set global RealNumber precision in .sage file

I want to change the real number precision from 53 to, say, 100.

I found this very similar question: ask.sagemath.org/question/7887/set-global-precision-for-reals/ (sorry it doesn't let me post a link), which says to use R=RealField(100); RealNumber=R

I tried it and it only works for me in the sage commandline, but not in .sage programs. Why is that and how do I get around it?