I do not know what the minimal condition is but if you are performing floating
point operations then the odds seem to be good:
1 0 2 +/ @: * (3 2 $ 3 1 2 1 1 0) NB. Wrong...
7 3
1 0 2 +"0/ @: * (3 2 $ 3 1 2 1 1 0) NB. Right...
5 1
1.00000001 0 2 +/ @: * (3 2 $ 3 1 2 1 1 0) NB. Right...
5.00000003 1.00000001
1 0 2 +/ @: * (3 2 $ 3 1 2 1 1 0.00000001) NB. Right...
5 1.00000002
also,
1 0 2 +/ @: (*"0) (3 2 $ 3 1 2 1 1 0)
5 1
(All the above for Windows 32 bit J 7.)
________________________________________
From: [email protected] [[email protected]] On Behalf Of June
Kim (김창준) [[email protected]]
Sent: Monday, January 10, 2011 12:10 PM
To: Beta forum
Subject: Re: [Jbeta] Nag nag nag nag
Uh-oh. I've been doing financial calculations with J and the following (old)
bug report is an alarm for me. Have to look at my codes again.
What is the minimal condition for the bug?
On Mon, Jan 10, 2011 at 7:02 PM, Roger Stokes <
[email protected]> wrote:
> Still got this old bug in j701:
>
> JVERSION
> Engine: j701/2011-01-07/14:33
> Library: 7.01.030
> Platform: Win 32
> Installer: j701a_win.exe
> InstallPath: c:/users/homer/j701
>
> 1 0 2 +/ @: * (3 2 $ 3 1 2 1 1 0)
> 7 3
>
> NB. The result 7 3 is wrong.
> NB. The correct result is 5 1, shown by replacing +
> NB. with an equivalent verb, say +"0 .
>
> 1 0 2 +"0 / @: * (3 2 $ 3 1 2 1 1 0)
> 5 1
>
> NB. This has been mentioned before, firstly
> NB. by Patrick Van Beek on 14 6 2008.
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm