ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 02 Sep 2019 19:07:52 +0200error for (3*e+2*I)*(-3+pi*I)https://ask.sagemath.org/question/47729/error-for-3e2i-3pii/so, I have to type in the problem (3e+2i)(−3+πi)...I enter in `(3*e+2*I)*(-3+pi*I)` on SageMath but come up with the answer, -30.74772176 + 19.61920267*I....am I dumb or is the correct answer?ariaaaaaaaaMon, 02 Sep 2019 19:07:52 +0200https://ask.sagemath.org/question/47729/does SAGE compute Pi using Chudnovsky algorithm?https://ask.sagemath.org/question/30113/does-sage-compute-pi-using-chudnovsky-algorithm/In 1989, Chudnovsky brothers discovered this method for computers to calculate digits of Pi.SK2015-31Mon, 19 Oct 2015 08:22:29 +0200https://ask.sagemath.org/question/30113/pi and e not evaluated when i use my own classeshttps://ask.sagemath.org/question/8588/pi-and-e-not-evaluated-when-i-use-my-own-classes/This question might be related to this question:
http://ask.sagemath.org/question/966/problem-with-sign-sgn-and-n
I have a symbolic calculation and I do evaluate it numerically. Within one of my classes (within my notebook; no external files) I evaluate this term
-1/e^(1/10*abs(-0.0555555555556*pi - 26714619/51021164)) + 1
within a for loop.
I am getting the following error:
> File "", line 1, in <module>
> File "/tmp/tmpkItECC/___code___.py", line
> 113, in <module>
> __temp=MuObject.calcValue((mu_enlacement[i])(**param_dict))
> File "/tmp/tmpJuxeqk/___code___.py",
> line 97, in calcValue
> self._result[self._k,_sage_const_0 ]=R(self._value(theta_1=item[_sage_const_0
> ],mu_t=item[_sage_const_1
> ],mu_j=item[_sage_const_1 ])) File
> "parent.pyx", line 988, in
> sage.structure.parent.Parent.__call__
> (sage/structure/parent.c:7326) File
> "coerce_maps.pyx", line 156, in
> sage.structure.coerce_maps.NamedConvertMap._call_
> (sage/structure/coerce_maps.c:4235)
> File "expression.pyx", line 862, in
> sage.symbolic.expression.Expression._mpfr_
> (sage/symbolic/expression.cpp:5117)
> File "expression.pyx", line 796, in
> sage.symbolic.expression.Expression._eval_self
> (sage/symbolic/expression.cpp:4912)
> TypeError: Cannot evaluate symbolic
> expression to a numeric value.
If I copy paste the expression
print
(-1/e^(1/10*abs(-0.0555555555556*pi - 26714619/51021164)) + 1).n()
to my notebook it evaluates fine to:
0.0674319647572598
I even tried to replace pi and e using a dictionary but I can't get it working.
Any ideas what i am doing wrong?
Thanks in advance,
Markus
P.S.: I can make the notebook public if usefullLouis CypherThu, 22 Dec 2011 15:38:38 +0100https://ask.sagemath.org/question/8588/polynomial digits of pihttps://ask.sagemath.org/question/9892/polynomial-digits-of-pi/How to find polynomial p_N(n) coefficients a_i_N,
p_N(n) = sum_i ( a_i_N * n^i , i=0:N )
such that p_N(n) gives the decimals of pi (where n=0...N) up to N:th decimal place. I did not find this in Sage ready made.
Does Sage have a function or another way to do this (returning a_i_N for each p_N, N ={1,2,...})? It should be both a numerical value up to a certain precision and a symbolic accurate answer?
JPIThu, 07 Mar 2013 12:28:18 +0100https://ask.sagemath.org/question/9892/