Re: problem converting Inf and NaN

2017-05-27 Thread Elizabeth Mattijsen
> On 27 May 2017, at 23:22, Elizabeth Mattijsen wrote: >> On 27 May 2017, at 19:33, Marcel Timmerman wrote: >> In perl6 version 2017.04.3-287-g3e7675a built on MoarVM version >> 2017.04-64-g6d5ea04 >> implementing Perl 6.c. I observe the following; >> >> my Num $num = Inf; >> my FatRat $f = $nu

Re: problem converting Inf and NaN

2017-05-27 Thread Elizabeth Mattijsen
> On 27 May 2017, at 19:33, Marcel Timmerman wrote: > In perl6 version 2017.04.3-287-g3e7675a built on MoarVM version > 2017.04-64-g6d5ea04 > implementing Perl 6.c. I observe the following; > > my Num $num = Inf; > my FatRat $f = $num.FatRat; > Type check failed in assignment to $f; expected F

problem converting Inf and NaN

2017-05-27 Thread Marcel Timmerman
Hi, In perl6 version 2017.04.3-287-g3e7675a built on MoarVM version 2017.04-64-g6d5ea04 implementing Perl 6.c. I observe the following; my Num $num = Inf; my FatRat $f = $num.FatRat; Type check failed in assignment to $f; expected FatRat but got Rational[Num,Int] (?) in block at line 1

[perl #72750] [TODO] Make 'Inf' and 'NaN' acceptable constants parameters in Rakudo

2010-02-13 Thread Carl Mäsak
near "foo(NaN) {" [...] * masak submits rakuodbug I stumbled on this, which really is a TODO bug of sorts, because I wanted to see if Inf and NaN would match other types than Num. TimToady mentioned in the backlog that they should.

Re: Inf and NaN

2006-08-01 Thread Ron Blaschke
Philip Taylor wrote: > Ron Blaschke wrote on 01/08/2006 08:17: >> >> I am wondering if this NaN != NaN property could be used for the isnan >> and finite tests, like so: [snip] >> Is this not portable enough? Is it better to look at the bits directly? [great stuff snipped] > It seems like the o

Re: Inf and NaN

2006-08-01 Thread Philip Taylor
Ron Blaschke wrote on 01/08/2006 08:17: I am wondering if this NaN != NaN property could be used for the isnan and finite tests, like so: int Parrot_math_isnan(double x) { return x != x; } int Parrot_math_finite(double x) { return (!Parrot_math_isnan(x - x)); } That is, if "x != x" it

Re: Inf and NaN

2006-08-01 Thread Ron Blaschke
Bill Coffman wrote: > NegNan doesn't exist, except as a fluke of the representation (see link for > how they are represented). A -NaN is the same as a NaN. They both fail > all > comparison tests, even NaN == NaN is false (unless your compiler optimizes > the comparison out). Only difference is

Re: Inf and NaN

2006-07-31 Thread Bill Coffman
NegNan doesn't exist, except as a fluke of the representation (see link for how they are represented). A -NaN is the same as a NaN. They both fail all comparison tests, even NaN == NaN is false (unless your compiler optimizes the comparison out). Only difference is the way they are stringified,

Re: Inf and NaN

2006-07-31 Thread Nicholas Clark
On Sun, Jul 30, 2006 at 10:45:29PM -0700, jerry gay wrote: > don't forget about negative-not-a-number, and the quiet (or signaling) Ah yes. that oxymoron. I've never yet seen the reasons for why it exists at all. Does anyone have a URL? Nicholas Clark

Re: Inf and NaN

2006-07-30 Thread jerry gay
On 7/30/06, Matt Diephouse <[EMAIL PROTECTED]> wrote: In the recent push to implement all of Tcl's [expr] command, Tcl has come to the point where it needs to understand Inf and NaN. After a brief discussion on IRC, it seems like PMCs are the proper way to handle this. Specifically

Inf and NaN

2006-07-30 Thread Matt Diephouse
In the recent push to implement all of Tcl's [expr] command, Tcl has come to the point where it needs to understand Inf and NaN. After a brief discussion on IRC, it seems like PMCs are the proper way to handle this. Specifically, three new PMC types: NaN, Inf, and NegInf. So here's wha