[Date Index] [Thread Index] [Author Index]
Re: why Pi is not recognized as a positive number?
On 1/2/04 at 4:23 AM, pedrito6 at softhome.net (Pedro L) wrote: > I wanted to define a function for the positive numbers. But I discovered > something "strange" with Mathematica. <snip Mathematica notebook example> The pattern x_Positive matches a thing named x with Head Positive. Since Pi doesn't have head Positive f is left unevaluated when defined as f[x_Positive]:= 1 + x You can get the result you want with Positive by either defining f as f[x_/;Positive@x]:= 1 + x or f[x_]:= 1 + x/;Positive@x -- To reply via email subtract one hundred and four