Skip to content
Newer
Older
100644 48 lines (33 sloc) 1.21 KB
207f13f [t] and [t/spec]
moritz authored Dec 25, 2008
1 use v6;
2
3 use Test;
4
72d4c05 @coke Add a test for RT #83622
coke authored Oct 13, 2012
5 plan 21;
207f13f [t] and [t/spec]
moritz authored Dec 25, 2008
6
7 # Undeterminate Math results
8 # see L<"http://mathworld.wolfram.com/Indeterminate.html">
05c3d8d @diakopter re-attempt to fix smartlinks in S02 to headings that contain C<>
diakopter authored Aug 11, 2011
9 # L<S02/"Infinity and C<NaN>" /Perl 6 by default makes standard IEEE floating point concepts visible>
207f13f [t] and [t/spec]
moritz authored Dec 25, 2008
10
11 is 0 * Inf , NaN, "0 * Inf";
12 is Inf / Inf, NaN, "Inf / Inf";
13 is Inf - Inf, NaN, "Inf - Inf";
a30ffc1 @usev6 Change test for 'NaN ** 0'
usev6 authored May 21, 2015
14 # RT #124450
15 is NaN ** 0, 1, "NaN ** 0";
207f13f [t] and [t/spec]
moritz authored Dec 25, 2008
16
17 is 0**0 , 1, "0**0 is 1, _not_ NaN";
18 is Inf**0 , 1, "Inf**0 is 1, _not_ NaN";
e6382da [t/spec] truncate() on Inf and NaN
kyle authored Jul 13, 2009
19
499a42d [t/spec] Make the NaN tests more thorough.
colomon authored Jul 27, 2010
20 ok NaN ~~ NaN, 'NaN is a NaN';
21 nok 4 ~~ NaN, '4 is not a NaN';
22 nok 4.Num ~~ NaN, "4.Num is not a NaN";
23
bb0a8fa @lizmat Use isa-ok instead of isa_ok
lizmat authored Apr 26, 2015
24 isa-ok NaN + 1i, Complex, "NaN + 1i is a Complex number";
499a42d [t/spec] Make the NaN tests more thorough.
colomon authored Jul 27, 2010
25 ok NaN + 1i ~~ NaN, "NaN + 1i ~~ NaN";
26 ok NaN ~~ NaN + 1i, "NaN ~~ NaN + 1i";
27
bb0a8fa @lizmat Use isa-ok instead of isa_ok
lizmat authored Apr 26, 2015
28 isa-ok (NaN)i, Complex, "(NaN)i is a Complex number";
499a42d [t/spec] Make the NaN tests more thorough.
colomon authored Jul 27, 2010
29 ok (NaN)i ~~ NaN, "(NaN)i ~~ NaN";
30 ok NaN ~~ (NaN)i, "NaN ~~ (NaN)i";
31
32 ok (NaN)i ~~ NaN + 1i, "(NaN)i ~~ NaN + 1i";
33 ok NaN + 1i ~~ (NaN)i, "NaN + 1i ~~ (NaN)i";
34
e6382da [t/spec] truncate() on Inf and NaN
kyle authored Jul 13, 2009
35 ok truncate(NaN) ~~ NaN, 'truncate(NaN) ~~ NaN';
7f29bc5 [t/spec] Add vim: lines everywhere.
kyle authored Aug 8, 2009
36
25668e6 @coke Prefer RT #XXXXXX
coke authored Jul 5, 2014
37 #?rakudo skip 'RT #83446'
bcb1a97 @coke niecza fudge
coke authored Sep 26, 2011
38 #?niecza skip 'Nominal type check failed for scalar store; got Num, needed Int or subtype'
5dcf3af @kyleha Test for RT 83446
kyleha authored Jul 27, 2011
39 ok (my Int $rt83446 = NaN) ~~ NaN, 'NaN fits in Int';
40
25668e6 @coke Prefer RT #XXXXXX
coke authored Jul 5, 2014
41 #RT #103500
a7ab785 @coke Add a test for rakudo RT #103500
coke authored Oct 9, 2012
42 is NaN.perl, 'NaN', 'NaN perlification ok';
43
25668e6 @coke Prefer RT #XXXXXX
coke authored Jul 5, 2014
44 #RT #83622
51fc070 @moritz [nan.t] add trailing semicolon
moritz authored Oct 14, 2012
45 ok NaN===NaN, "NaN value identity";
72d4c05 @coke Add a test for RT #83622
coke authored Oct 14, 2012
46
7f29bc5 [t/spec] Add vim: lines everywhere.
kyle authored Aug 8, 2009
47 # vim: ft=perl6
Something went wrong with that request. Please try again.