Group Abstract Group Abstract

Message Boards Message Boards

Unexpected output from Reduce?

Posted 2 years ago
POSTED BY: Cody Luo
3 Replies
POSTED BY: Henrik Schachner

I suppose it is because PrimeQ is meant as a test for numbers. When given a symbol, such as in PrimeQ[x], it gives False.

I would use Element[x, Primes], which remains unevaluated when x is a symbol.

POSTED BY: Gianluca Gorni

Gianluca, your are simply too fast - and with the better solution! Best regards -- Henrik

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