develooper Front page | perl.perl6.users | Postings from April 2021

Re: Comparing Int and Num

Thread Previous | Thread Next
Ralph Mellor
April 16, 2021 00:22
Re: Comparing Int and Num
Message ID:
On Wed, Apr 14, 2021 at 3:10 AM sisyphus <> wrote:
> Is this a bug that I ought to report ?

I'm not yet convinced the issues you showed are classifiable as bugs.

Part of my reasoning for my conservatism is per the guidance Larry
provided in the design docs. In particular, per design doc S02:

> num         native floating point

> Num         number (approximate Real, generally via floating point)

Your focus is, aiui, floating point numbers, and Raku handling them
as exact doubles, not approximate Reals. As such I think we should
switch our focus to `num` for a while, not `Num`, and to initializing
`num` variables from `int`s, not `Int`s:

my int $i = ...;
my num $n = $i;

Also, maybe search for 'float' and 'num ' in these documents and read
what Larry had to say:



Also, maybe check out roast. A search for 'float' suggests these two
as the ones that at first glance seem most worth looking at:




I hope to get time to respond to your earlier posts this weekend.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About