Message Boards Message Boards

GROUPS:

[✓] Use CompositeQ[x]?

Posted 10 months ago
839 Views
|
4 Replies
|
2 Total Likes
|

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?

4 Replies

In[1]:= CompositeQ[4]

Out[1]= True

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

enter image description here

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

For version 8, you can use something like

CompositeQ = Composition[Not, PrimeQ];

CompositeQ[4]

(* True *)
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