Skip to contentSkip to conversation

AIM Independent Resource Benchmark results for kernel-2.5.44

BENCHMARK John Hawkes 3 participants 4 messages Oct 26, 2002 – Oct 29, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

From: "Siva Koti Reddy" <[email protected]>

Quoted 1 line

39 new_raph Unable to solve equation in 100 tries. P =

1.5708, P0

Quoted 3 lines

= 1.5708, delta = 6.12574e-17
new_raph: Success
*** Failed to execute new_raph ***

The AIM7/AIM9 new_raph is broken code. The convergence loop termination conditional looks something like:
if (delta == 0) break;
for a type "double" delta. You ought to change that to be something like:
if (delta <= 0.00000001L) break;

--
John Hawkes

#2 lore raw
Quoted 7 lines · John Hawkes

From: "Siva Koti Reddy" <[email protected]>

Quoted 1 line

39 new_raph Unable to solve equation in 100 tries. P =

1.5708, P0

Quoted 3 lines

= 1.5708, delta = 6.12574e-17
new_raph: Success
*** Failed to execute new_raph ***

Quoted 6 lines

The AIM7/AIM9 new_raph is broken code. The convergence loop termination conditional looks something like:

   if (delta == 0) break;
for a type "double" delta.  You ought to change that to be something
like:
   if (delta <= 0.00000001L) break;

I usually specify the compiler flag -ffloat-store and that fixes the issue for me.

Signature · 3 lines
Nate Straz                                              [email protected]
sgi, inc                                           http://www.sgi.com/
Linux Test Project                                  http://ltp.sf.net/
#3 lore raw
Quoted 10 lines · Nathan Straz
Quoted 7 lines

The AIM7/AIM9 new_raph is broken code. The convergence loop termination conditional looks something like:

   if (delta == 0) break;
for a type "double" delta.  You ought to change that to be something
like:
   if (delta <= 0.00000001L) break;

I usually specify the compiler flag -ffloat-store and that fixes the issue for me.

Maybe that will work as a work-around. But it is nothing but a work-around. The previous poster was right - the code is broken.

The "==" operator usually doesn't have any reasonable use on floating point values (yes there are cases where it makes sense, but this is not one of them).

A result from any computation on double values cannot be assumed to "equal" anything in particular. Zero included.

The correct way to terminate that loop is, like was already suggested, doing a comparison to see if the residual is "numerically zero" or "sufficiently zero-ish for the given purpose". Eg. "delta < 1E-12" or eventually "fabs(delta) < 1E-12".

Comparing to zero makes *no* sense. It's written by someone who has no understanding of numerics (or perhaps just didn't think clearly at that moment - /me trying not to insult more people than strictly necessary ;)

Signature · 6 lines
................................................................
:   [email protected]   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:
#4 lore raw
Quoted 8 lines · Jakob Oestergaard
Quoted 7 lines · Nathan Straz
Quoted 6 lines

The AIM7/AIM9 new_raph is broken code. The convergence loop termination conditional looks something like:

   if (delta == 0) break;
for a type "double" delta.  You ought to change that to be something
like:
   if (delta <= 0.00000001L) break;
Quoted 5 lines
Quoted 2 lines

I usually specify the compiler flag -ffloat-store and that fixes the issue for me.

Maybe that will work as a work-around. But it is nothing but a work-around. The previous poster was right - the code is broken.

/me looks at the code

	/*
	 * Step 4: if |p - p0| < TOL then terminate successfully
	 */
	delta = fabs(p - p0);
	if (delta == 0.0)
		break;

Ok, I'll admit that the code does look broken, especially with regard to the comment *in* the code.

Is anyone from Caldera still maintaining this code or shall I create a CVS module as part of LTP?

Signature · 3 lines
Nate Straz                                              [email protected]
sgi, inc                                           http://www.sgi.com/
Linux Test Project                                  http://ltp.sf.net/