Newsgroups: comp.lang.apl
Path: watmath!ljdickey
From: ljdickey@watmath.waterloo.edu (L. J. Dickey)
Subject: Re: A J bug?
Message-ID: <1992Jan29.054901.25647@watmath.waterloo.edu>
Organization: University of Waterloo
References: <WEG.92Jan22181330@mace.cc.purdue.edu> <1992Jan23.014437.10419@csi.jpl.nasa.gov>
Date: Wed, 29 Jan 1992 05:49:01 GMT
Lines: 45

Bob Hendricks has written and asked me to post this message to
the news group "comp.lang.apl".  I am afraid that this means that
those who receive this news group as reflected by the bitnet mail server
"APL-L at UNB" will see it twice.  I am sorry about that... I don't
know any to make this available to all without this happening.
Anyway, here is the message from Bob Hendricks.
					Lee Dickey

>From APL-L@UNBVM1.BITNET Fri Jan 24 05:42 EST 1992
Comments:     Original-Date: 24 Jan 92 02:58:44 EST
From: 72740.1026@COMPUSERVE.COM (Bob Hendricks)
Subject:      J Bug

This is in reply to Eythan Weg's report of a possible J bug in release 3.4
running on a VAX.  I tested the function "stirling" under J 3.4 and 4.0 on a
PC and got the correct result ... so the problem is not in 3.4, for what
that's worth.

Sam Sirlin must be correct.  The term that causes the problem is the y ^ y +
0.5 term which has an exponent of 45 when y =. 30.

I was able to get the correct result by converting the algorithm to use
natural logs and then taking the inverse.  The converted function is:

    stirling =. ^ & ( (^. %: o. 2)&+ & (- + (0.5&+) * ^.) )

    stirling 170
7.25386e306       (slightly different than what Sam got on his Sparc)
    !171
_
    stirling 171
1.79769e308

Bob Hendricks

Newsgroups
result...so
Sirlin
Sparc
stirling
-- 
Leroy J. (Lee) Dickey, Faculty of Mathematics, U of Waterloo, Canada  N2L 3G1
Internet:      ljdickey@watmath.UWaterloo.ca
UUCP:          ljdickey@watmath.UUCP             ...!uunet!watmath!ljdickey
Obsolescent?:  ljdickey@watmath.waterloo.edu     BITNET/EARN: ljdickey@watdcs
