why Pi is not recognized as a positive number?
- To: mathgroup at smc.vnet.net
 - Subject: [mg45360] why Pi is not recognized as a positive number?
 - From: Pedro L <pedrito6 at softhome.net>
 - Date: Fri, 2 Jan 2004 04:23:48 -0500 (EST)
 - Reply-to: Pedro L <pedrito6 at softhome.net>
 - Sender: owner-wri-mathgroup at wolfram.com
 
  I wanted to define a function for the positive numbers. But I discovered
  something "strange" with Mathematica.
  Could you help me with this?
  Thanks in advance.
  Peter L  (Spain)
{
Cell[CellGroupData[{
Cell[BoxData["$Version"], "Input",
  CellLabel->"In[1]:="],
Cell[BoxData["\<\"5.0 for Microsoft Windows (June 11, 2003)\"\>"], \
"Output",
  CellLabel->"Out[1]="]
}, Open  ]],
Cell[BoxData[
    RowBox[{
      RowBox[{"f", "[", "x_Positive", "]"}], ":=",
      RowBox[{"x", "+", "1", "  "}]}]], "Input",
  CellLabel->"In[2]:="],
Cell[CellGroupData[{
Cell[BoxData[
    RowBox[{"Positive", "[", "Pi", "]"}]], "Input",
  CellLabel->"In[3]:="],
Cell[BoxData["True"], "Output",
  CellLabel->"Out[3]="]
}, Open  ]],
Cell[CellGroupData[{
Cell[BoxData[
    RowBox[{"f", "[", "Pi", "]"}]], "Input",
  CellLabel->"In[4]:="],
Cell[BoxData[
    RowBox[{"f", "[", "\[Pi]", "]"}]], "Output",
  CellLabel->"Out[4]="]
}, Open  ]],
Cell[BoxData[
    RowBox[{"Remove", "[", "f", "]"}]], "Input",
  CellLabel->"In[5]:="],
Cell[BoxData[
    RowBox[{
      RowBox[{"f", "[",
        RowBox[{"x_", " ", "/;", " ",
          RowBox[{"x", ">", "0"}]}], "]"}], ":=",
      RowBox[{"x", "+", "1"}]}]], "Input",
  CellLabel->"In[6]:="],
Cell[CellGroupData[{
Cell[BoxData[
    RowBox[{"f", "[", "Pi", "]"}]], "Input",
  CellLabel->"In[7]:="],
Cell[BoxData[
    RowBox[{"1", "+", "\[Pi]"}]], "Output",
  CellLabel->"Out[7]="]
}, Open  ]],
Cell[BoxData[
    RowBox[{"Remove", "[", "f", "]"}]], "Input",
  CellLabel->"In[8]:="]
}
- Follow-Ups:
- Re: why Pi is not recognized as a positive number?
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
 
 
 - Re: why Pi is not recognized as a positive number?