Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hello,
In the solution to my recently asked question "programming a recursion" it was noted that MC has problems with the accuracy of long-number arithmetic. As a test in derive I have successfully solved the following task: To determine a power of two, i.e. 2^n for natural n, which begins with the decadic digit sequence 2023. I am interested in an MC-compatible search algorithm.
If you are interested, I would be happy to provide my derive solution as an attached text file. Which text format is desired here in this forum?
Kind regards, Alfred Flasshaar
Solved! Go to Solution.
BTW, using brute force and Mathcads symbolic I found n=10103 to be the smallest solution for 2^n = 2023...
For at least the next ten years it gets easier 😉
A slight modification can bring up all solutions within a given range
MC15 file attached
I would suggest to attach a pdf and the Derive file itself for dinosaurs like me which still have Derive installed on a machine.
According long-integer arithmetic - there is none in Mathcad. Mathcads numeric uses the usual IEEE format with its typical 15-16 significant digits precision and the symbolics also has its limits, I guess.
In contrast, Derive has always internally operated exclusively on integers of arbitrary length and could therefore provide "arbitrary" (limited by addressable memory) precision and was immune to rounding and conversion errors.
It was already in the DOS version an ingenious program with an unbelievable power on just one floppy disk.
BTW, using brute force and Mathcads symbolic I found n=10103 to be the smallest solution for 2^n = 2023...
For at least the next ten years it gets easier 😉
A slight modification can bring up all solutions within a given range
MC15 file attached
Yes, 10103 is the first/smallest solution ending in ...008. The closest solutions are 23404 with ...016 and 25540 with ...776. And there are more of them. It's amazing what derive can do. I found the first solution "manually" because of the high computing speed.
Not sure what you mean by "closest" solution and why the ending digits would be of interest.
The next two solutions are 12239 and 14375 and the powers end with ...9888 and ...3568 resp..
And what do you mean by "manually" finding the solution in Derive ?
Is there a clever, non-brute force mathematical way to get the solution(s)?
And yes, computing speed in Derive usually beats Mathcads symbolics.
p. s.
... only with help of derive´s "table".