Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/15/85; site amdcad.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!amdcad!jimb From: jimb@amdcad.UUCP (Jim Budler) Newsgroups: net.micro.mac Subject: Re: Harmonic Series Benchmark Message-ID: <1543@amdcad.UUCP> Date: Fri, 7-Jun-85 13:51:47 EDT Article-I.D.: amdcad.1543 Posted: Fri Jun 7 13:51:47 1985 Date-Received: Sat, 8-Jun-85 04:07:44 EDT References: <1363@amd.UUCP> <6437@boring.UUCP> <1493@amdcad.UUCP> <392@gumby.UUCP> Reply-To: jimb@amdcad.UUCP (Jim Budler) Organization: AMD, Sunnyvale, California Lines: 79 In article <392@gumby.UUCP> g-inners@gumby.UUCP writes: >No, the garbage is posting a 'benchmark' that runs on only one machine. > >What you posted wasn't a benchmark, it was an example program for >Mac C. Don't advertise falsely, and you won't get flames! What I posted was the program I used to generate times posted in net.micro.mac, so people would know how I got the times in what I thought was a better manner than (to quote one of the other posters) "... the times are clocked between printf statements." The reason I posted anything was because I spent much time trying to find the _exact_ algorithm used by the original poster. His verbal discription was certainly far less useful than my source code. The _actual_ algorithm of the benchmark is only one line of code in each precision: for (i = 1; i < 10000; i++) j += 1.0/i; If that couldn't be determined by a quick scan of the code I guess you couldn't READ C. What do all you people do? A C program comes over the net, you don't even read it, but pass it through your compiler to see if it will break???? The ONLY reason that the program contained the name of the compiler so many times was that the code started a one algorithm in double which was then copied and pasted twice for each precision, then doubled again to get the output into a file as well as the screen. A simple mechanical effort to duplicate a reasonable test of floating point accuracy and speed has turned into a major issue. Your comments about a benchmark requiring portability is also rot. The byte, sieve of erat... benchmark is a Benchmark. The C program to run it is a Benchmark IMPLEMENTATION. The Harmonic Benchmark was described as " the sum of the first 10,000 terms of the harmonic series, with an answer of 9.787613." I wrote an IMPLEMENTATION, and added the doubles answer of 9.787606. In the intervening week before the flames started coming in the net contained many interesting and informative comments appeared: 1.) The series is more accurate if run in reverse. I added this to my program (without posting the source), and found that the Mac retains accuracy in doubles. The new answers are 9.787604 in float, and 9.787606 in double. 2.) We discovered that the minimum time for the series using SANE is 16.5 seconds. 3.) An IBM PC AT is reported to take 1/3 the time my program took. BUT since the reporter didn't describe his method of timing his implementation we really don't know the exact speed difference. I will admit to only TWO, count them ONE, TWO errors in that program of any concern: 1.) The use of // comments allowed by my compiler but not K&R. 2.) Placing a declaration in the body of a block, again allowed by my compiler, but not K&R. I do NOT want to hear again that extended is not K&R, because the use of extended had a purpose within the meaning of the program. Now, I'm tired of all this flaming so please direct the rest of them to the wastbasket. -- Jim Budler Advanced Micro Devices, Inc. (408) 749-5806 UUCPnet: {ucbvax,decwrl,ihnp4,allegra,intelca}!amdcad!jimb Compuserve: 72415,1200 "... Don't sue me, I'm just the piano player!...."