On Wed, Feb 19, 2020 at 9:58 PM ToddAndMargo via perl6-users <perl6-users@perl.org <mailto:perl6-users@perl.org>> wrote:

    Hi All,

    This is a complete trivia question.

    Is there a test to see if a number is irrational,
    such as the square root of two?

    And how does Int handle a irrational number?  Is
    there a limit to magic Larry powder?

    Many thanks,
    -T


On 2020-02-19 19:20, Paul Procacci wrote:
 >> Is there a test to see if a number is irrational
There is no such thing as an irrational number in computing.

Surely there are "close approximations", but that's the best any computer language can currently do.


Hi Paul,

$ perl6 -e 'my num $x=sqrt(2); say $x;'
1.4142135623730951

No Magic Larry "Num" that has no set length?
And I thought Larry was unstoppable!  Guess
he gave up at UInt and Int.

:-)

-T

Reply via email to