Message Boards Message Boards

0
|
4326 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

[?] Use CompositeQ[x]?

Posted 6 years ago

I have a problem with the CompositeQ function--it only returns my input. So, by the literature: CompositeQ[4] should return "true". Instead it returns CompositeQ[4].

Any ideas?

POSTED BY: Patrick Cesarano
4 Replies

For version 8, you can use something like

CompositeQ = Composition[Not, PrimeQ];

CompositeQ[4]

(* True *)
POSTED BY: Ilian Gachevski

Please next time check version when the function was introduced in docs at the bottom of the function's page. It is version 10 for CompositeQ, and your version is 8.

http://reference.wolfram.com/language/ref/CompositeQ.html

enter image description here

POSTED BY: Moderation Team

Yes. Great. But...this is what happens to me (question marks are mine...nothing to do with the software).:

enter image description here

POSTED BY: Patrick Cesarano

In[1]:= CompositeQ[4]

Out[1]= True

POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract