Re: [Jprogramming] Complex Number Problems

2017-07-01 Thread Don Kelly
It appears that the construct 2r.2 is not described in NuVoc and that it is , in fact equivalent to 2%0.2 or 20r2. it is similar to 1p.2 ==1p0.2 or pi to the power of 0.2 you are dealing with nouns in either case and there is a built in conversion that allows the use of 2r.2 to be treated a

Re: [Jprogramming] Complex Number Problems

2017-07-01 Thread HenryRich
To summarize: A word is numeric if and only if it begins with 0-9 or _ Within a numeric word, zero is not required before a decimal point. 1e.4 is not allowed because the exponent must be an integer. Henry Rich On 7/1/2017 1:46 PM, Martin Kreuzer wrote: Raul - * Many thanks for pointing ou

Re: [Jprogramming] Complex Number Problems

2017-07-01 Thread Martin Kreuzer
Raul - * Many thanks for pointing out the difference between (.) the character and (.) the conjunction; has made it very clear. * Powers of 10 -- the Dictionary says under /Constants that "The form of a numeric constant ... is elaborated by the use of further letters, as in 2r3 for two-thir

Re: [Jprogramming] Complex Number Problems

2017-07-01 Thread Martin Kreuzer
Agreed. -M At 2017-07-01 15:26, you wrote: I think the inconsistency you are pointing to here is that r. as a verb has a different meaning from r in number formation? But I think that that's a red herring. For example, e. as a verb has a different meaning from e in number formation. Thanks,

[Jprogramming] Complex Number Problems

2017-07-01 Thread Lawrence Wickert
The fog is lifting. I realize that trying to learn J the way I learned Fortran, PL/I and C is not the right way to go. J is truly special. The Dissect tool is great. I also realized that paying attention to the colors of the tokens in the jqt editor eliminates many stupid errors. Many thank

Re: [Jprogramming] Complex Number Problems

2017-07-01 Thread Raul Miller
I think the inconsistency you are pointing to here is that r. as a verb has a different meaning from r in number formation? But I think that that's a red herring. For example, e. as a verb has a different meaning from e in number formation. Thanks, -- Raul On Sat, Jul 1, 2017 at 7:34 AM, Mart

Re: [Jprogramming] Complex Number Problems

2017-07-01 Thread Raul Miller
Looking at word formation is important for understanding this issue: ;:'2 .3 .4 .5' +-+-+-+-+-+-+-+ |2|.|3|.|4|.|5| +-+-+-+-+-+-+-+ ;:'0.2 0.3 0.4 0.5' +---+ |0.2 0.3 0.4 0.5| +---+ ;:'3j.4' ++ |3j.4| ++ An issue here is that . is a conjunction and passing

Re: [Jprogramming] Complex Number Problems

2017-07-01 Thread Martin Kreuzer
Looking at (r.) Angle, which is a verb somewhat similar to (j.) Complex, I get 2 r. 0.2 1.96013j0.397339 2 r.0.2 1.96013j0.397339 2 r. 2 _0.832294j1.81859 2 r.2 _0.832294j1.81859 which all four look fine to me, but are not constistent with (j.)'s behaviour, that's been my point ...

Re: [Jprogramming] Complex Number Problems

2017-07-01 Thread bill lam
this is parsed as a token ;:'3e.4' ++ |3e.4| ++ but it (rightfully?) throws an error 3e.4 |ill-formed number this is also parsed as a token ;:'3j.4' ++ |3j.4| ++ the behavior seems endemic 3p.4 4.74221 3ad.4 2.3j0.0209438 3ar.4 2.76318j1.16826 3x.4 4.47547

Re: [Jprogramming] Complex Number Problems

2017-07-01 Thread Rob Hodgkinson
It is valid, but don’t think it is what was intended … The following 2 statements produce the same result: 3j5 3j5 (3) j. (5) 3j5 And these 2 statements produce the same result also. 3j.4 NB. This is a valid complex constant of 3+i*0.4 3j0.4 (3) j. (0.4) 3j0.4 As Raul pointed o

Re: [Jprogramming] Complex Number Problems

2017-07-01 Thread Martin Kreuzer
Looking at the examples, I came across the difference between 3 j. 4 NB. spaces 3j4 and 3j.4 NB. no spaces 3j0.4 Given that this (rightfully) throws an error .2 .3 .4 .5 |syntax error |.2 .3 .4 .5 while this doesn't 0.2 0.3 0.4 0.5 0.2 0.3 0.4 0.5 why then is