Re: why so different

2020-06-22 Thread Aureliano Guedes
Thanks again. I'm trying to get proficiency in Raku by converting some Python programs mine in Raku. On Mon, Jun 22, 2020 at 6:41 PM Tobias Boege wrote: > On Mon, 22 Jun 2020, Aureliano Guedes wrote: > > Thank you for the clarification. > > > > There is a method to set Rat precision at the

Re: why so different

2020-06-22 Thread Tobias Boege
On Mon, 22 Jun 2020, Aureliano Guedes wrote: > Thank you for the clarification. > > There is a method to set Rat precision at the scope of the program to apply > to all *.Rat() cases? > I don't know, based on a quick search in the documentation, of any global setting. The hacky solution would

Re: why so different

2020-06-22 Thread Aureliano Guedes
Thank you for the clarification. There is a method to set Rat precision at the scope of the program to apply to all *.Rat() cases? On Mon, Jun 22, 2020 at 5:57 PM Tobias Boege wrote: > On Mon, 22 Jun 2020, Aureliano Guedes wrote: > > Hi all, > > > > First, I'm naive in Raku. Then let's go to

Re: why so different

2020-06-22 Thread Tobias Boege
On Mon, 22 Jun 2020, Aureliano Guedes wrote: > Hi all, > > First, I'm naive in Raku. Then let's go to my question. > > I'm trying to figure out why we got so different results here: > > > e.Rat()**(pi.Rat()*i) > -0.9902-1.3942922582021257e-07i > > e**(pi*i) >

why so different

2020-06-22 Thread Aureliano Guedes
Hi all, First, I'm naive in Raku. Then let's go to my question. I'm trying to figure out why we got so different results here: > e.Rat()**(pi.Rat()*i) -0.9902-1.3942922582021257e-07i > e**(pi*i) -1+1.2246467991473532e-16i > e.Rat()**(pi.Rat()*i) == e**(pi*i) False I understand the

Re: junctions and parenthesis

2020-06-22 Thread Tobias Boege
On Mon, 22 Jun 2020, Elizabeth Mattijsen wrote: > BEGIN trait_mod:(, :tighter(:<*>)); > > comes to mind, but that doesn't seem to do the trick. > My guess: tighter and looser are only consulted by the parser in contexts where 'any' was recognized as an *operator*.

Re: junctions and parenthesis

2020-06-22 Thread Elizabeth Mattijsen
BEGIN trait_mod:(, :tighter(:<*>)); comes to mind, but that doesn't seem to do the trick. > On 22 Jun 2020, at 21:11, Tobias Boege wrote: > > On Mon, 22 Jun 2020, Joseph Brenner wrote: >> Patrick R. Michaud wrote: >> >>> The "any" function is just like any other function taking an arbitrary

Re: junctions and parenthesis

2020-06-22 Thread Tobias Boege
On Mon, 22 Jun 2020, Joseph Brenner wrote: > Patrick R. Michaud wrote: > > > The "any" function is just like any other function taking an arbitrary list > > of arguments (including user-defined functions). As such it parses with > > lower precedence than comparison operators -- so "eq" binds

Re: junctions and parenthesis

2020-06-22 Thread Joseph Brenner
Patrick R. Michaud wrote: > The "any" function is just like any other function taking an arbitrary list > of arguments (including user-defined functions). As such it parses with > lower precedence than comparison operators -- so "eq" binds more tightly > than "any". Thanks, makes sense. > I'm