Front page | perl.perl6.users |
Postings from June 2020
why so different
Thread Next
From:
Aureliano Guedes
Date:
June 22, 2020 20:37
Subject:
why so different
Message ID:
CAG9gabTK37REQSuQ8TaO66u69KwQnUt8701YPxSVEmCASa2wdw@mail.gmail.com
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.9999999999999902-1.3942922582021257e-07i
> e**(pi*i)
-1+1.2246467991473532e-16i
> e.Rat()**(pi.Rat()*i) == e**(pi*i)
False
I understand the Num actually have the traditional behavior which leads
this:
0.1.Num() + 0.2.Num() != 0.3.Num()
And Rat is awesome cos deal nice to the real world.
Anyway, I do not expect so different results between Rat and Num.
Thanks,
Aureliano Guedes
--
Aureliano Guedes
skype: aureliano.guedes
contato: (11) 94292-6110
whatsapp +5511942926110
Thread Next
-
why so different
by Aureliano Guedes