Ask Your Question
1

nth root of huge number

asked 2016-10-10 04:05:01 +0100

questioner14 gravatar image

I have been reading for the last hour about different ways to take an nth root in sage. I am having trouble finding a way to do so for a number such as

383359376317228026832765614031101780857214373741934853796883469684751393959423303934031779306976105234618634914722122231966050161090557311139688754390702005669975825514220776140658553598335180339644221202109745240693646681489614040361698983885974381266138822986136754230956173498395067036601233601299698337833849969027885834924082799260330843401454066113756946449729494314541583444719025620597701816509274146453

Any help would be much appreciated. I have tried ^(1/n) and pow and a number of others.

edit retag flag offensive close merge delete

Comments

kcrisman gravatar imagekcrisman ( 2016-10-10 04:45:12 +0100 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2016-10-10 04:49:35 +0100

kcrisman gravatar image

If you are looking for a numerical approximation, there are several routes open to you. Here are two.

  • You can approximate after taking it with e.g. a.n(digits=100), like here
  • You can use a decimal point like 383. instead of 383 and then do the root

More advanced options include setting a "real field" with a certain accuracy like R=RealField(1000) and using that ...

edit flag offensive delete link more
2

answered 2016-11-08 12:58:10 +0100

slelievre gravatar image

updated 2016-11-08 13:14:50 +0100

If you are wondering whether this number is a perfect power, you can check that it is divisible by 7 but not by 7^2.

sage: a = 383359376317228026832765614031101780857214373741934853796883469684751393959423303934031779306976105234618634914722122231966050161090557311139688754390702005669975825514220776140658553598335180339644221202109745240693646681489614040361698983885974381266138822986136754230956173498395067036601233601299698337833849969027885834924082799260330843401454066113756946449729494314541583444719025620597701816509274146453
sage: a % 7
0
sage: a % 7^2
28
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2016-10-10 04:05:01 +0100

Seen: 1,240 times

Last updated: Nov 08 '16