Post Reply 
Programming Exercise (HP-15C, 15C LE - and others)
04-04-2014, 02:19 AM
Post: #85
RE: Programming Exercise (HP-15C, 15C LE - and others)
(04-02-2014 04:25 PM)DGM Wrote:  Note: all programs return this result in the display: 0.693097183059948;

Back to an authentic HP device, I get 0.693097183059945297 on the HP-200LX running TurboBCD:

Code:

Program Ex_8_3_b;
var n, s: real;
begin
  s := 0;
  n := 10000;
  repeat
    s := s + 1/(Sqr(n) - n);
    n := n - 2
  until n = 0;
  WriteLn(s:19:18)
end.

It takes 50 seconds, however.

Oh, and close to nothing on my old dv2250br notebook, another authentic HP device Smile

Gerson
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming Exercise (HP-15C, 15C LE - and others) - Gerson W. Barbosa - 04-04-2014 02:19 AM



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