Hello!

So, I run the following code to compute some numbers. They should all 
simplify to whole numbers(the imaginary part is 0), and originally I was 
using the simplify_full() function to make this happen, however this become 
more and more time intensive until, when using it in this case, the 
computation for 10 different values of num was taking over a day(and I 
don't have that kind of time). 
z1 = (e^(2*pi*i/14))^4
z2 = (e^(2*pi*i/14))^6
z3 = (e^(2*pi*i/14))^8
z4 = (e^(2*pi*i/14))^10
z5 = (e^(2*pi*i/14))^2
z6 = (e^(2*pi*i/14))^12
num = lambda k: -z1^k*(z2-1)^(k+1)*(z3-1)^(k+1)*(z4-1)^(k+1)*(z5-1)^(k+1)*(
z6-1)^(k+1) + -z2^k*(z1-1)^(k+1)*(z4-1)^(k+1)*(z3-1)^(k+1)*(z5-1)^(k+1)*(z6-
1)^(k+1) + -z3^k*(z4-1)^(k+1)*(z2-1)^(k+1)*(z1-1)^(k+1)*(z5-1)^(k+1)*(z6-1
)^(k+1) + -z4^k*(z3-1)^(k+1)*(z2-1)^(k+1)*(z1-1)^(k+1)*(z5-1)^(k+1)*(z6-1)^(
k+1) + -z5^k*(z4-1)^(k+1)*(z2-1)^(k+1)*(z1-1)^(k+1)*(z3-1)^(k+1)*(z6-1)^(k+1
) + -z6^k*(z4-1)^(k+1)*(z2-1)^(k+1)*(z1-1)^(k+1)*(z3-1)^(k+1)*(z5-1)^(k+1)
show([(real(CC(num(k)))) for k in [0..40]] 


However, I could get the decimal approximations by doing CC(num(i)) for 
whatever value of i I want. However, the problem is that this shows that, 
by like i >= 10 or so, the imaginary part stops being a small decimal, 
which makes me think that there would be even more error in the real part. 
I was hoping that I could take the output of the real part and just treat 
it as a whole number(by multiplying by 10 to the correct exponent). But, 
I'm not sure this gives me the right numbers. I was hoping there was some 
way to increase the precision in the decimals. FOr example, in Mathematica, 
you can do something like 

Re[N[num[40], 100]]

and that gives me 100 decimal points of accuracy. My end goal is to more 
quickly approximate these numbers (they're whole numbers, so they should 
only take a finite amount of precision). How can I go about getting more 
precision here? Thanks!


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to