Message Boards Message Boards

[✓] Use CompositeQ[x]?

GROUPS:

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
Answer
3 months ago

In[1]:= CompositeQ[4]

Out[1]= True

POSTED BY: Frank Kampas
Answer
3 months ago

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
Answer
3 months ago

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
Answer
3 months ago

For version 8, you can use something like

CompositeQ = Composition[Not, PrimeQ];

CompositeQ[4]

(* True *)
POSTED BY: Ilian Gachevski
Answer
3 months ago

Group Abstract Group Abstract