in reply to Re^5: Can I access and use UV types from perl? (updated)
in thread Can I access and use UV types from perl?

for the greater understanding and enoblement of homus erectus.

That and, well one reason may be to help with the documentation on the Rat() function in Perl 6. By understanding what Perl is doing with numbers at the level of the Naturals we can possibly figure out how to convert the Rationals into Reals and update the Docs accordingly.

Well that and just sanity in general.

Replies are listed 'Best First'.
Re^7: Can I access and use UV types from perl?
by haukex (Archbishop) on Nov 17, 2019 at 22:57 UTC
    That and, well one reason may be to help with the documentation on the Rat() function in Perl 6.

    My understanding from a quick look at the Raku (formerly known as Perl 6) documentation is:

    • int is a native integer, so like Perl's IV
    • Int is like Perl's Math::BigInt (bignum; note that enables Math::BigFloats too)
    • Num is a native float, so like Perl's NV
    • Rat is basically like two integers for numerator and denominator, overflowing causes it to be cast to Num (which seems like a downgrade to me)
    • FatRat is like Perl's Math::BigRat (bigrat)

    I don't see an equivalent of Math::BigFloat in Raku at the moment.

    By understanding what Perl is doing with numbers at the level of the Naturals

    I think Perl's data types are much more closely aligned with the underlying native types than with mathematical concepts like natrual numbers, whole numbers, etc.

    we can possibly figure out how to convert the Rationals into Reals

    According to the docs, role Rational[::NuT, ::DeT] does Real { ... } already...?