MathGroup Archive 2004

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

Search the Archive

Re: Arg[z] that works with zero argument?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg50881] Re: Arg[z] that works with zero argument?
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Sat, 25 Sep 2004 01:55:32 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 9/24/04 at 4:41 AM, siegman at stanford.edu (AES/newspost) wrote:

>I'd like a simple Arg[z] function that would "work" [return some
>simple value; zero is OK] for zero argument values, even if z is a
>list.

>My simplest kludge so far is

>myArg[z_] := Module[{eps=10^(-17)}, Arg[z+eps]]

>Seems to work OK so far -- better ways to do this?

Did you try Arg[z] where z is a list?

Attributes[Arg]
{Listable, NumericFunction, Protected}

Arg[Table[Random[], {4}]]
{0, 0, 0, 0}

The attribute Listable tells you Arg will accept a list as a argument and do the right thing.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Arg[z] that works with zero argument?
  • Next by Date: Simple questions with Complex Numbers
  • Previous by thread: Re: Arg[z] that works with zero argument?
  • Next by thread: Re: Arg[z] that works with zero argument?