Skip to content

Commit

Permalink
Add explicit test numy acotan -∞ gives -0e0
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Oct 19, 2016
1 parent d6cb68a commit ee12821
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion S02-types/num.t
Expand Up @@ -622,11 +622,13 @@ ok Num === Num, 'Num === Num should be truthy, and not die';
}

subtest 'acotan(num)' => {
plan 28;
plan 29;

cmp-ok acotan(my num $ ), '===', NaN, 'uninitialized';
cmp-ok acotan(my num $ = NaN), '===', NaN, 'NaN';

is acotan(my num $ = -∞).Str, '-0', '-∞ is -0';

is-approx acotan(my num $ = ∞), my num $ = 0e0, '∞';
is-approx acotan(my num $ = -∞), my num $ = -0e0, '-∞';
is-approx acotan(my num $ = 0e0), my num $ = Ο€/2, '0e0';
Expand Down

0 comments on commit ee12821

Please sign in to comment.