Post Reply 
One-liner mini-challenge [HP-71B]
04-13-2015, 08:14 PM (This post was last modified: 04-14-2015 03:30 AM by Gerson W. Barbosa.)
Post: #1
One-liner mini-challenge [HP-71B]
\[\frac{1}{\sqrt{1}}+\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{3}}+\frac{1} {\sqrt{4}}+\frac{1}{\sqrt{5}}+\cdots+\frac{1}{\sqrt{n}}\]

Write an HP-71B BASIC program and use it to evaluate the sum above when n = 10¹². The program must fit in one line. Accuracy in the widest range as

possible is desirable, but if you manage to show 12 correct digits for that particular required n, then it is ok. I will present an 80-character long

program that gives accurate results for n as low as 30, in less than 300 milliseconds.

This can be extended to other HP calculators and the WP-34S as well. As a reference, a 21-step program on the latter gives 12 accurate digits when n =

30 and 33 or 34 correct digits for n around 100000 and greater.


Have fun!

Gerson.


EDITED TO CHANGE THE SUBJECT TITLE AS THE MATH ROM IS NOT REQUIRED.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
One-liner mini-challenge [HP-71B] - Gerson W. Barbosa - 04-13-2015 08:14 PM



User(s) browsing this thread: 1 Guest(s)