Bo wrote:
> Devon, your solution
>  9!:19]1e_11
This was not intended as a solution but a demonstration that +. is
sensitive to comparison tolerance.  "9!:19" sets comparison tolerance but
does not allow an argument greater than 1e_11.

On Sat, May 16, 2020 at 11:25 AM Raul Miller <rauldmil...@gmail.com> wrote:

> In an expression like
>
>    +./&.:(1p1&*)12 30
> 6
>
> we should note that 12 and 30 are both [small] integers (and, thus, exact).
>
> Also, 1p1 is a value close to pi, and while it's true that it's not
> exactly pi, it's a common factor in this context. So it comes through
> in the gcd result.
>
> Basically it's just an arbitrary value which has an exact
> representation (which is all that matters in this context).
>
> Thanks,
>
> --
> Raul
>
>
>
>
>
>
> On Sat, May 16, 2020 at 8:24 AM 'Bo Jacoby' via Programming
> <programm...@jsoftware.com> wrote:
> >
> >  Raul, note that this works:
> >
> >    (+.&.(*&1p1))/2 3
> >
> > 1
> >
> >
> >
> > even though  the numbers
> >
> >    0j16":(*&1p1)2 3
> >
> > 6.2831853071795862 9.4247779607693793
> >
> > do not satisfy your demands of being exactly represented.
> > Thanks!
> > Bo
> >
> >
> >
> >
> >     Den lørdag den 16. maj 2020 13.03.21 CEST skrev Hauke Rehr <
> hauke.r...@uni-jena.de>:
> >
> >  The answer 3j2 looks sane.
> > 3j2 * 0j1 0j_1
> > and the only one in the first quadrant.
> > Nice!
> >
> > Am 16.05.20 um 12:32 schrieb Raul Miller:
> > > Oh, I see -- or, I think I see what you were trying to illustrate now.
> > >
> > > That said, this is kind of interesting:
> > >    +./(,-)2j_3
> > > 3j2
> > >
> > > But I also noticed that +/(,-) seems to bring back associativity (we
> > > already had commutativity with +.):
> > >
> > >    (i.6) A."0 1]4.57 4.34 4.44
> > > 4.57 4.34 4.44
> > > 4.57 4.44 4.34
> > > 4.34 4.57 4.44
> > > 4.34 4.44 4.57
> > > 4.44 4.57 4.34
> > > 4.44 4.34 4.57
> > >    +./@(,-)"1 (i.6) A."0 1]4.57 4.34 4.44
> > > 8.88178e_16 8.88178e_16 8.88178e_16 8.88178e_16 8.88178e_16 8.88178e_16
> > >
> > > Thanks,
> > >
> > >
> > > --
> > > Raul
> > >
> > > On Sat, May 16, 2020 at 5:51 AM Hauke Rehr <hauke.r...@uni-jena.de>
> wrote:
> > >>
> > >> sorry, I was not sufficiently precise about my example
> > >> I meant to talk about atomic a only
> > >>
> > >> if $ a is empty, then
> > >> +./ (, -) a
> > >> will work
> > >>
> > >> Thanks for pointing out the lack of precision.
> > >>
> > >> Am 16.05.20 um 11:46 schrieb Raul Miller:
> > >>> I was talking about the implementation.
> > >>>
> > >>> These are different results:
> > >>>
> > >>>      +./@(,-)4.57 4.34 4.44
> > >>> 8.88178e_16
> > >>>      +./@(,-)&.x:4.57 4.34 4.44
> > >>> 0.01
> > >>>      +./@(,-)&.:(*&1p1)4.57 4.34 4.44
> > >>> 5.65432e_16
> > >>>
> > >>> The reason is that binary floating point cannot represent 5^_1 nor
> > >>> 5^_2 accurately.
> > >>>
> > >>> Thanks,
> > >>>
> > >>
> > >> --
> > >> ----------------------
> > >> mail written using NEO
> > >> neo-layout.org
> > >> ----------------------------------------------------------------------
> > >> For information about J forums see
> http://www.jsoftware.com/forums.htm
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> >
> > --
> > ----------------------
> > mail written using NEO
> > neo-layout.org
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


-- 

Devon McCormick, CFA

Quantitative Consultant
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to