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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

GCD not working with vector

Jensen
1-Newbie

GCD not working with vector

See the very last lines in the attached file.
gcd (greatest common denominator) works when I specifically enter the individual array values, but fails when I specify only the array.

Your assistance would be greatly appreciated!

Roy Jensen
2 REPLIES 2
RichardJ
19-Tanzanite
(To:Jensen)

It's a round-off problem, coupled with a strange bug. The vector "norm" does not contain integers. That should not be a problem, as long as the gcd function either accepts them as integers to within some tolerance, and then rounds them internally, of flags an error. With a list of scalars it seems to do that, but with a vector there are certain cases where it just gives a bogus answer.

Richard

Top Tags