WP 34S mini-challenge
|
01-21-2014, 03:44 PM
(This post was last modified: 01-21-2014 03:47 PM by Gerson W. Barbosa.)
Post: #27
|
|||
|
|||
RE: WP 34S mini-challenge
(01-21-2014 11:29 AM)Paul Dale Wrote: I considered an integer mode solution too. The shortest I could come up with is: In principle the mini-challenge is interested only in integer results ("It computes the sum of the first n natural numbers using Gauss's formula."). Of course if it gives valid results for real inputs, as does my original solution, yours and Didier's, so much the better. It is required that the calculator modes get back to the default settings (like DECM) when done, in case they're changed by the program. This would make for five steps (additional BASE 02 and DECM instructions), if DECM restored the original float numbers when switching back from BASE 02, of course. If we are pleased with integer arguments only, then even an HP-42S is almost possible: Code:
100000 XEQ GS --> 5000050000 but 50000 XEQ GS --> 1250024999 (too bad this error of 1 unit due to rounding error) Cheers, Gerson. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)