In easy steps (and for further reference) ...
From these test data (two floats, two integers, different signs), to
get the fractional parts
v=. 2.25 _8.11 16 _3
simply taking the Residue (when dividing by 1) doesn't work (error at
negative float position)
1|v
0.25 0.89 0 0
So first
1&| works perfectly
Den 9:19 søndag den 6. august 2017 skrev Martin Kreuzer
:
In easy steps (and for further reference) ...
From these test data (two floats, two integers, different signs), to
get the fractional parts
v=. 2.25 _8.11 16 _3
simply taking
1&| does work, actually.
And, if you want an offset of -1 on that result when the original
value was negative, you can use (1&| - 0&>)
Thanks,
--
Raul
On Sun, Aug 6, 2017 at 3:19 AM, Martin Kreuzer wrote:
> In easy steps (and for further reference) ...
>
> From these
All, Thanks for the help.
Here's some real numbers from a problem I'm working on:
Calculate some values from this equation:
v=:2%(3r19-%1 2 3 245 246 247 248)
v
_2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986
Raul's first suggestion:
1|v
0.625 0.153846 0.6 0.0027933 0.00139082 0
ip would be best implemented as
ip=: * * <.@|
as it would return an integer result.
Louis
> On 06 Aug 2017, at 12:17, Skip Cave wrote:
>
> All, Thanks for the help.
>
> Here's some real numbers from a problem I'm working on:
> Calculate some values from this
"
On my wish list would be something similar for the “each" adverb. While writing
tacit code I very often find myself writing
u@(0{::]) ; v@:(1{::]) etc.
"
Louis, I find the points you raised very interesting and they might
influence Jx v1.1.
Meanwhile, if you really very often would
There is no need for a new fill element, since the type could not be
seen naked. Thus, the only fill which is needed to represent the
proposed uses of this type is ace.
It does, however, need a display representation, since you can format
the containing box.
Note also that the 5!: series of
I am not sure if I understand your question. If you asked something undefined
is a gerund or not. I checked by executing v@.0 '' and the J interpreter said
value error. Sounds like an empty array joke to me.
Sent from my iPhone
On 7 Aug, 2017, at 5:23 AM, Jose Mario Quintana
Coming late because of no internet.
The proposal is for a new noun type that contains a verb but not an AR, as
the current gerund does, right?
You can't unbox it, because that would produce an illegal result.
This is mainly a performance improvement, right? The AR is not an internal
I am not hoping to change people's minds; nevertheless, I would like to
explain, to some degree, my rationale regarding my current notion of what a
gerund is.
The Dictionary is famous (or infamous according to some?) for its
terseness. It is not really surprising to me that different people have
temp=: 2 : 0
[: (v^:_1@(4 : 'y`:6 >x')"0 m $~ $) <@v
)
atop=: 2 : 'm temp (v :. ])'
under=: 2 : 0
m temp v : ([: (v^:_1@(4 : 'y`:6&>/x')"0 m $~ $) ,&<)
)
compose=: 2 : 'm under (v :. ])'
rank=: 2 : 'm atop (]"n)'
‘rank’ is “ as Henry suggested for gerunds, and I propose
11 matches
Mail list logo