🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #1500

Harmonic Series Benchmark

#1500
From: Jim Budler
Date: Sat, 25 May 1985 07:45
46 lines
2467 bytes
Someone on arpanet proposed a floating point benchmark of timing the
sum of the first 10,000 terms of the harmonic series, i.e. for 
i = 1 to 100000; sum = sum + 1/i;  
He listed times for Megamax = long, Aztec = 36 seconds; MacModula = 9
seconds; and MacFortran = 4 seconds.
He also stated the right answer was 9.787613 determined from a Vax 11/780
taking 0.02 seconds.

Now either I'm doing it wrong or something, because I didn't get that
answer on an IBM 3081.  But anyway, here is my results, with the
actual output of the Macintosh using Mac C from Consulair.
----------------------------------------------------------------------
Calculating the sum of 10,000 terms of the harmonic series
Vax 11/780 with FPU took 0.02 seconds, answer was 9.787613
The originator of this problem assumed this was the right answer!
IBM 3081 UTS System III took 0.00? seconds, the answer was 9.787606
Valid 68000 BDS4.1c workstation took 23 seconds, the answer was 9.787606

This is an Apple Macintosh(TM) with Mac C(TM),
	using Double, 64 bit precision:
Time = 34.48 Seconds
This answer is 9.787606

Bill Duvall, Consulair, recommends using extended
precision for computation as it is the native mode
of the SANE and Mac C floating point, so:


This is an Apple Macintosh(TM) with Mac C(TM),
	using Extended, 80 bit precision:
Time = 25.15 Seconds
This answer is 9.787606
--------------------------------------------------------------
The times and answers for the IBM3081, Valid and of course the Mac
are mine.  At least, if my math is wrong, it's consistent, so the 
relative times and accuracies are meaningful.

It's obvious to me that Bill Duvall was correct when he said to 
do the calculations in extended and convert the results for
printing.  It also looks like decent times for the Mac.
-- 
 Jim Budler
 Advanced Micro Devices, Inc.
 (408) 749-5806
 UUCPnet: {ucbvax,decwrl,ihnp4,allegra,intelca}!amdcad!jimb
 Compuserve:	72415,1200
Technical Details
Message-ID: <1353@amd.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!amd!jimb

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site amd.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!amd!jimb
From: jimb@amd.UUCP (Jim Budler)
Newsgroups: net.micro.mac
Subject: Harmonic Series Benchmark
Message-ID: <1353@amd.UUCP>
Date: Sat, 25-May-85 03:45:38 EDT
Article-I.D.: amd.1353
Posted: Sat May 25 03:45:38 1985
Date-Received: Sat, 25-May-85 10:00:44 EDT
Reply-To: jimb@amd.UUCP (Jim Budler)
Organization: AMD MOSCAD
Lines: 46