cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in Prime?

SOLVED
Emerald III

Bug in Prime?

At n=1000 all is OK. At n=5000 - Prime has an error!

What is it?

CM-15.png

CM-Prime.png

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Bug in Prime?

Valery Ochkov wrote:

Thanks, Werner!

But without Fred's function we have a bug in Prime! In Mathcad 16 all is OK at n=10^5

Yes, its a bug. I could reproduce it.

Not sure what the reason for it could be.

First thought was that it might be a confusion between local X and global X, but using X <-- X in the program first did not change anything.

View solution in original post

11 REPLIES 11

Re: Bug in Prime?

Work around:

Re: Bug in Prime?

Yep, I find the same Fred, but in Mathcad 11!

I suppose that Mathcad 15 is the exception here and

Once more, they've managed to bring some functionality of Mathcad 11 into Prime. That .... is.... an.... improvement....?

Here's the fun stuf (I stripped the program somewhat):

Notice that you loose array elements. With every run I get between 90 and 99 elements for each of the two elements of Z.

And notice how all the other, non-NaN elements are 0. (I can't check what Prime does here, I'm limited to Express = no programming).

But when I make Z a function of X and Y, I consistently get two arrays of 100 elements back, and the in-between numbers are (mostly) non-zero:

Luc

Re: Bug in Prime?

When n=10, I (also) loose about 1 to 10 elements, so am sometimes left with zero elements in the two parts of Z, but sometimes:

I get them all.

So do I loose 0 to 10 elements consistently...

What if n=1000:

OK, it's possible to loose more than 10 elements, but it's rare. The worst I've seen in about 50 runs is 15 elements lost.

Luc

Re: Bug in Prime?

Oh, and:

50k points is no problem, neither is 500k:

Re: Bug in Prime?

In Mathcad 15 - all OK. Problems in Prime by a big n.

Re: Bug in Prime?

Fred Kohlhepp написал(а):

Work around:

n - ?

Highlighted

Re: Bug in Prime?

Is it a center of mass (gravity)?

The converted sheet from Mathcad 15 to Prime 3.1 gives an error. See two sheets in attach.

23-8-Ship.png

Re: Bug in Prime?

Valery Ochkov wrote:

Fred Kohlhepp написал(а):

Work around:

n - ?

Higher values of n are no problem with Freds function!

Unfortunately Primes Plot is limited to 500001 points.

Re: Bug in Prime?

Thanks, Werner!

But without Fred's function we have a bug in Prime! In Mathcad 16 all is OK at n=10^5

CM.png