MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Q about using Round.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20426] Q about using Round.
  • From: d8442803 at student.nsysu.edu.tw (Wen-Feng Hsiao)
  • Date: Tue, 26 Oct 1999 00:33:09 -0400
  • Organization: MIS
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

   The following procedures are an example of 'Round' in the Mathematica 
help. It is strange that the round of square-root of pi is 1. It is 
supposed to be 2. Why?

Wen-Feng

-=-=-=-
In[6]:=
NumericRound[x_] := MapAll[If[NumericQ[#], Round[#], #] &, x]
In[7]:=
\!\(NumericRound[\ at \[Pi] + \((\[ExponentialE] + a)\)\ x + \((4.3 - 
            8.6  \[ImaginaryI]\ )\) x\^3]\)
Out[7]=
\!\(1 + \((3 + a)\)\ x + \((4 - 9\ \[ImaginaryI])\)\ x\^3\)

(* When changing it into the following , I obtain the desired result. 
Why? *)
In[8]:=
\!\(NumericRound[\((\ at \[Pi] + \((\[ExponentialE] + a)\)\ x + \((4.3 - 
                8.6  \[ImaginaryI]\ )\) x\^3)\) // N]\)
Out[8]=
\!\(2 + \((3 + a)\)\ x + \((4 - 9\ \[ImaginaryI])\)\ x\^3\)


  • Prev by Date: drawing tilted ellipses?
  • Next by Date: Possible mis-documentation
  • Previous by thread: Q about using Round.
  • Next by thread: Re: Q about using Round.