No, **| is much better; the "much" comes from that a number (incl. complex
number) has a magnitude and a direction and **| expresses that much better.
 Thanks.


On Mon, May 27, 2013 at 4:52 AM, Cliff Reiter <[email protected]> wrote:

> Is there a reason to prefer (*|@*) over (**|)?
>
>    ts=:6!:2 , 7!:2@]
>    1000 ts'(* |@*)&.+. ^ 0j1 * 1r2p1 * i. 500'
> 0.00106239 43200
>    1000 ts'(**|)&.+. ^ 0j1 * 1r2p1 * i. 500'
> 0.000791911 43072
>
> Best, Cliff
>
>
> On 5/27/2013 1:34 AM, km wrote:
>
>> I didn't think of Signum!  Thanks, Roger.
>>
>> Sent from my iPad
>>
>>
>> On May 26, 2013, at 11:56 PM, Roger Hui <[email protected]>
>> wrote:
>>
>>  clean=: (* |@*)&.+.
>>>
>>> Eugene McDonnell objected when we made *x to be 0 for x near 0, saying
>>> that
>>> *x should be 0 only if x is 0.
>>>
>>>
>>> On Sun, May 26, 2013 at 9:32 PM, km <[email protected]> wrote:
>>>
>>>  Let's say a real number "ought to be zero" if its absolute value is <:
>>>> the
>>>> comparison tolerance 2^_44 .  Write a verb "clean" that replaces real
>>>> numbers that ought to be zero with zero.  How would you clean a complex
>>>> number?
>>>>
>>>>     1 o. 1r2p1 * i. 5
>>>> 0 1 1.22465e_16 _1 _2.44929e_16
>>>>     clean 1 o. 1r2p1 * i. 5
>>>> 0 1 0 _1 0
>>>>
>>>>     ^ 0j1 * 1r2p1 * i. 5
>>>> 1 6.12323e_17j1 _1j1.22465e_16 _1.83697e_16j_1 1j_2.44929e_16
>>>>     clean ^ 0j1 * 1r2p1 * i. 5
>>>> 1 0j1 _1 0j_1 1
>>>>
>>>> --Kip Murray
>>>>
>>>> Sent from my iPad
>>>>
>>>> ------------------------------**------------------------------**
>>>> ----------
>>>> For information about J forums see http://www.jsoftware.com/**
>>>> forums.htm <http://www.jsoftware.com/forums.htm>
>>>>
>>> ------------------------------**------------------------------**
>>> ----------
>>> For information about J forums see 
>>> http://www.jsoftware.com/**forums.htm<http://www.jsoftware.com/forums.htm>
>>>
>> ------------------------------**------------------------------**
>> ----------
>> For information about J forums see 
>> http://www.jsoftware.com/**forums.htm<http://www.jsoftware.com/forums.htm>
>>
>>
> --
> Clifford A. Reiter
> Lafayette College, Easton, PA 18042
> http://webbox.lafayette.edu/~**reiterc/<http://webbox.lafayette.edu/~reiterc/>
>
>
> ------------------------------**------------------------------**----------
> For information about J forums see 
> http://www.jsoftware.com/**forums.htm<http://www.jsoftware.com/forums.htm>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to