 |
|
List Archives > 
Mathcad List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[mathcad] RE: Mathcad bug or programming error?
| [mathcad] RE: Mathcad bug or programming error? |
|
Author: Bury, Scott SJ
Posted: Mon, 28 Jan 2008 12:07:08 -0600
|
I get the same behavior in v13.
Best Regards,
Scott
(979)-238-1832
________________________________
From: "Andy.Spragg" "mailto:Andy.Spragg"
Sent: Monday, January 28, 2008 7:11 AM
To: Mathcad Discussion List
Subject: [mathcad] Mathcad bug or programming error?
Hi folks,
The attached v11 worksheet contains two versions of a program,
that I believe to be trivially different. The output from the two
versions is utterly different. I spent altogether too long trying to
find the error of my ways in one version, before scraping the barrel of
reformulation and finding it not to be empty after all.
I seek opinions on whether the difference in output is due to
Mathcad bug or programming error. If the former is the case, it is a
pretty toxic bug (which may of course have long since been squashed).
Can anyone please either point out my error, or test these programs in
the current version of Mathcad?
Andy
|
| [mathcad] RE: Mathcad bug or programming error? |
|
Author: Stuart Bruff
Posted: Mon, 28 Jan 2008 18:29:39 -0000
|
Andy
You've overloaded phi as the end matrix name and the inner summation vector
- use a MathStyle to distinguish between the two.
Stuartr
From: "Andy.Spragg" "mailto:Andy.Spragg"
Sent: 28 January 2008 1:11 PM
To: Mathcad Discussion List
Subject: [mathcad] Mathcad bug or programming error?
Hi folks,
The attached v11 worksheet contains two versions of a program, that I
believe to be trivially different. The output from the two versions is
utterly different. I spent altogether too long trying to find the error of
my ways in one version, before scraping the barrel of reformulation and
finding it not to be empty after all.
I seek opinions on whether the difference in output is due to Mathcad bug or
programming error. If the former is the case, it is a pretty toxic bug
(which may of course have long since been squashed). Can anyone please
either point out my error, or test these programs in the current version of
Mathcad?
Andy
--
This message has been scanned for viruses and
dangerous content by <http://www.houxou.com/> Houxou, and is
believed to be clean.
|
|
Attachments:
sumbug1.mcd
|
| [mathcad] Re: Mathcad bug or programming error? |
|
Author: Tom Gutman
Posted: Mon, 28 Jan 2008 21:08:29 -0800
|
It's a programming error. In the first expression phi is reset to a
scalar in the inner loop, hence all the previous columns are lost.
Tom Gutman
From: "Andy.Spragg"
To: Mathcad Discussion List "mathcad"
Sent: Monday, January 28, 2008 5:11 AM
Subject: [mathcad] Mathcad bug or programming error?
> Hi folks,
>
> The attached v11 worksheet contains two versions of a program, that
I
> believe to be trivially different. The output from the two versions
is
> utterly different. I spent altogether too long trying to find the
error of
> my ways in one version, before scraping the barrel of reformulation
and
> finding it not to be empty after all.
>
> I seek opinions on whether the difference in output is due to
Mathcad bug
> or programming error. If the former is the case, it is a pretty
toxic bug
> (which may of course have long since been squashed). Can anyone
please
> either point out my error, or test these programs in the current
version
> of Mathcad?
>
> Andy
>
>
> ****************************************************************
> Any opinions expressed in this email are those of the individual and
not necessarily of RHM Limited and/or any of its subsidiaries.
> This email and any files transmitted with it are private, may be
confidential and are for the intended recipient only. If you are not
the intended recipient, be advised that you have received them in
error. Please notify the sender of the error, delete all copies of
them from your system and destroy any printed copies.
> If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this email
and any files transmitted with it.
> Please rely on your own anti-virus system. No responsibility is
taken by RHM Limited and/or any of its subsidiaries for any damage
arising out of any bug or virus infection.
> Registered Office : Premier House, Centrium Business Park, Griffiths
Way, St Albans, Hertfordshire, AL1 2RE
> Registered No. 3946774
> ****************************************************************
>
|
| [mathcad] RE: Mathcad bug or programming error? |
|
Author: Neil Harris
Posted: Tue, 29 Jan 2008 08:36:44 -0000
|
Hi Andy,
Sorry, but it's a programming error. You use phi as the dummy variable
in the sum loop and as the vector collecting the results. If you change
the name of the dummy variable, it works OK.
Neil
________________________________
From: "Andy.Spragg" "mailto:Andy.Spragg"
Sent: 28 January 2008 13:11
To: Mathcad Discussion List
Subject: [mathcad] Mathcad bug or programming error?
Hi folks,
The attached v11 worksheet contains two versions of a program, that I
believe to be trivially different. The output from the two versions is
utterly different. I spent altogether too long trying to find the error
of my ways in one version, before scraping the barrel of reformulation
and finding it not to be empty after all.
I seek opinions on whether the difference in output is due to Mathcad
bug or programming error. If the former is the case, it is a pretty
toxic bug (which may of course have long since been squashed). Can
anyone please either point out my error, or test these programs in the
current version of Mathcad?
Andy
|
| [mathcad] Re: Mathcad bug or programming error? |
|
Author: William J Marshall
Posted: Mon, 28 Jan 2008 14:37:51 -0500
|
Hello Andy,
Well it sure looks like a bug. Here's a clue: I got function 1 to behave
normally by simply replacing the internal variable phi (f CTRL-G) by a
non-Greek variable name. What does that say?
I hope this helps,
Bill
"Andy.Spragg"
01/28/2008 12:59 PM
Please respond to
"mathcad"
To
Mathcad Discussion List "mathcad"
cc
Subject
[mathcad] Mathcad bug or programming error?
Hi folks,
The attached v11 worksheet contains two versions of a program, that I
believe to be trivially different. The output from the two versions is
utterly different. I spent altogether too long trying to find the error of
my ways in one version, before scraping the barrel of reformulation and
finding it not to be empty after all.
I seek opinions on whether the difference in output is due to Mathcad bug
or programming error. If the former is the case, it is a pretty toxic bug
(which may of course have long since been squashed). Can anyone please
either point out my error, or test these programs in the current version
of Mathcad?
Andy
[attachment "sumbug.mcd" deleted by William J Marshall/RES/Raytheon/US]
|
| [mathcad] RE: Mathcad bug or programming error? |
|
Author: Pergande, Albert N
Posted: Mon, 28 Jan 2008 13:48:07 -0500
|
one difference is in the left function, j goes 2 to I, and inthe right,
it goes 2 to I-1
Al Pergande
Senior Radar Engineer
Lockheed Martin Missiles and Fire Control
MP 200
5600 Sandlake Road
Orlando, Fl 32819
Voice 407-356-5169
Fax 407-356-0933
"albert.n.pergande"
for personal mail - "al"
________________________________
From: "Andy.Spragg" "mailto:Andy.Spragg"
Sent: Monday, January 28, 2008 8:11 AM
To: Mathcad Discussion List
Subject: [mathcad] Mathcad bug or programming error?
Hi folks,
The attached v11 worksheet contains two versions of a program, that I
believe to be trivially different. The output from the two versions is
utterly different. I spent altogether too long trying to find the error
of my ways in one version, before scraping the barrel of reformulation
and finding it not to be empty after all.
I seek opinions on whether the difference in output is due to Mathcad
bug or programming error. If the former is the case, it is a pretty
toxic bug (which may of course have long since been squashed). Can
anyone please either point out my error, or test these programs in the
current version of Mathcad?
Andy
|
| [mathcad] Re: Mathcad bug or programming error? |
|
Author: Chris Whitford
Posted: Tue, 29 Jan 2008 09:32:25 +0000
|
In f1 you have used the variable phi twice. In the innermost loop (j)
change phi to a different name, and all works as expected.
Chris
At 13:11 28/01/2008 +0000, you wrote:
>Hi folks,
>
>The attached v11 worksheet contains two versions of a program, that I
>believe to be trivially different. The output from the two versions is
>utterly different. I spent altogether too long trying to find the error of
>my ways in one version, before scraping the barrel of reformulation and
>finding it not to be empty after all.
>
>I seek opinions on whether the difference in output is due to Mathcad bug
>or programming error. If the former is the case, it is a pretty toxic bug
>(which may of course have long since been squashed). Can anyone please
>either point out my error, or test these programs in the current version
>of Mathcad?
>
>Andy
>
+ Chris Whitford
+ Research Fellow, University of Leicester, Space Research Centre,
+ Physics and Astronomy Department, University Road, LEICESTER LE1 7RH, UK
+ Tel: +44 116 252 3496, Fax: +44 116 252 2464
+ email: "chw" http://www.star.le.ac.uk/
|
| [mathcad] RE: Mathcad bug or programming error? |
|
Author: Pergande, Albert N
Posted: Mon, 28 Jan 2008 15:03:25 -0500
|
Your problem seems to be in assigning "phi s" to "phi super s". Every
time you make the assignment with a new values of S, you create a new
phi with a single column vector. I suggest you do phi <-- augment (phi,
phi s) You will need to create a dummy vector phi, or handle the column
0 case as an exception.
Al Pergande
Senior Radar Engineer
Lockheed Martin Missiles and Fire Control
MP 200
5600 Sandlake Road
Orlando, Fl 32819
Voice 407-356-5169
Fax 407-356-0933
"albert.n.pergande"
for personal mail - "al"
________________________________
From: "Andy.Spragg" "mailto:Andy.Spragg"
Sent: Monday, January 28, 2008 8:11 AM
To: Mathcad Discussion List
Subject: [mathcad] Mathcad bug or programming error?
Hi folks,
The attached v11 worksheet contains two versions of a program, that I
believe to be trivially different. The output from the two versions is
utterly different. I spent altogether too long trying to find the error
of my ways in one version, before scraping the barrel of reformulation
and finding it not to be empty after all.
I seek opinions on whether the difference in output is due to Mathcad
bug or programming error. If the former is the case, it is a pretty
toxic bug (which may of course have long since been squashed). Can
anyone please either point out my error, or test these programs in the
current version of Mathcad?
Andy
|
| [mathcad] RE: Mathcad bug or programming error? |
|
Author: Zijp, Maarten
Posted: Tue, 29 Jan 2008 09:45:40 +0100
|
Hi Andy,
Sorry to say but to my opinion it is a simple programming error. Inside
both for loops you initiliaze your result matrix therefore you will
loose all results from pass 1 upto S-1. Mathcad cannot be blamed this
time...
So, use another variable to store the intermediate results, I used t.
You might also considere to either change the upper range of iteration
variable j to I-1 as is the case in version two or adapt the upper range
for j in function f2 in the summation......
kind regards
Maarten Zijp
Maarten Zijp
room 5045
Information Technology Group
Leerstoelgroep Toegepaste Informatiekunde
Social Sciences Group
Wageningen University
Leeuwenborch (Building 201)
Hollandseweg 1
6706 KN Wageningen
The Netherlands
tel (0)317-484079 fax(0)317-483158
E-mail: "maarten.zijp"
internet: http://www.inf.wur.nl/ <http://www.inf.wur.nl/>
________________________________
From: "Andy.Spragg" "mailto:Andy.Spragg"
Sent: 28 January 2008 14:11
To: Mathcad Discussion List
Subject: [mathcad] Mathcad bug or programming error?
Hi folks,
The attached v11 worksheet contains two versions of a program, that I
believe to be trivially different. The output from the two versions is
utterly different. I spent altogether too long trying to find the error
of my ways in one version, before scraping the barrel of reformulation
and finding it not to be empty after all.
I seek opinions on whether the difference in output is due to Mathcad
bug or programming error. If the former is the case, it is a pretty
toxic bug (which may of course have long since been squashed). Can
anyone please either point out my error, or test these programs in the
current version of Mathcad?
Andy
|
|
Attachments:
Outlook.jpg
|
| [mathcad] Re: Mathcad bug or programming error? |
|
Author: Eden Mei
Posted: Mon, 28 Jan 2008 11:12:39 -0800
|
Looks to me like a programming error. The line immediately following the rnorm is loada the array with zeros, but you do this on every iteration, so every iteration, the array is again zeroed, until the last iteration, when columns 10 and 11 get populated but not zeroed. This is something that you don't do at all in the second program, so your claim of them being trivially different is not. Part of the problem is that you're using the same variable in two different places for two different things.
From: "Andy.Spragg"
To: Mathcad Discussion List
Sent: Monday, January 28, 2008 5:11 AM
Subject: [mathcad] Mathcad bug or programming error?
Hi folks,
The attached v11 worksheet contains two versions of a program, that I believe to be trivially different. The output from the two versions is utterly different. I spent altogether too long trying to find the error of my ways in one version, before scraping the barrel of reformulation and finding it not to be empty after all.
I seek opinions on whether the difference in output is due to Mathcad bug or programming error. If the former is the case, it is a pretty toxic bug (which may of course have long since been squashed). Can anyone please either point out my error, or test these programs in the current version of Mathcad?
Andy
|
Previous by date: [mathcad] Mathcad bug or programming error?, Andy Spragg
Next by date: [mathcad] RE: Mathcad bug or programming error?, Stuart Bruff
Previous thread: [mathcad] Re: Spam appearing to come from List, Paul Bragg
Next thread: [mathcad] RE: Mathcad bug or programming error?, Bury, Scott SJ
|
|
|