Re: Mma: 13 is not prime!
- To: mathgroup at smc.vnet.net
- Subject: [mg4634] Re: Mma: 13 is not prime!
- From: Harald Berndt <haraldb at nature.berkeley.edu>
- Date: Thu, 22 Aug 1996 03:54:52 -0400
- Organization: University of California Forest Products Lab
- Sender: owner-wri-mathgroup at wolfram.com
Felix Holderied wrote: > > Please help me: > > In[]:= > PrimeQ[13] > Out[]= > True > > In[]:= > PrimeQ[p] /.{p->13} > Out[]= > False > > WHY? > > Greetings, Felix It's all in the evaluation order! Basically, you get the answer for PrimeQ[p] which is evaluated before the replacement takes place (and has of course the result False). Try instead In[93]:= ReleaseHold[ Hold[PrimeQ[p]] /.{p->13} ] Out[93]= True -- _______________________________________________________________ Harald Berndt University of California Research Specialist Forest Products Laboratory Phone: 510-215-4224 FAX:510-215-4299 _______________________________________________________________ ==== [MESSAGE SEPARATOR] ====