Notice

Due to inappropriate SPAM postings, our forums are now being monitored for inappropriate content. This will cause your post to not appear publicly until it has been approved by a forum moderator. We apologize for the delay this may cause in your response, but have found it the best way to control inappropriate posts.

Perfect Square Factors
 DroopyPawn Posted: Jan 23 2007, 02:37 AM How can I set a condition so that my number x has no factors that are perfect squares?
 Support QA Posted: Jan 24 2007, 10:35 AM Please see attached bank for an example. Attached File ( Number of downloads: 2143 )  No_Squared_Factors.bnk
 DroopyPawn Posted: Jan 24 2007, 09:20 PM Ok. Your example will work if I need to create a number with no perfect square factors but it doesn't answer my question.My problem generates a number as a function of other variables. But I don't know beforehand what the generated value will be. I need to check whether or not my generated value has perfect square factors.I tried a condition like...isrelprime(x,4) and isrelprime(x,9) and isrelprime(x,16) and isrelprime(x,25) etc up to my maximum expected value. Couldn't get it to work though.Any other ideas?
 Support DC Posted: Oct 8 2007, 01:23 PM Can you try working backwards? In other words, try creating the number so that it will have only prime factors.
 gbc65 Posted: Oct 17 2007, 06:36 PM "I tried a condition like...isrelprime(x,4) and isrelprime(x,9) and isrelprime(x,16) and isrelprime(x,25) etc up to my maximum expected value. Couldn't get it to work though."would it work if your condition was isrelprime(x,4) OR isrelprime(x,9) OR isrelprime(x,16) OR isrelprime(x,25) etc ?
 Support DC Posted: Oct 19 2007, 08:39 AM Try using this:Question:Is var1 relatively prime?Answer:correctDefinitions:var1 range(4,16)correct if((var1 MOD 4)=0,"Contains factor",if((var1 MOD 9)=0,"Contains factor",if((var1 MOD 16)=0,"Contains factor","Relatively Prime")))
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: