Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 29 lines (16 sloc) 0.497 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
use v6;
use Test;
plan 4;

# L<S32::Numeric/Numeric/"Numeric provides some constants">

=begin pod

=head1 DESCRIPTION

Basic tests for builtin Num::pi

=end pod


# See also: L<"http://theory.cs.iitm.ernet.in/~arvindn/pi/"> :)
my $PI = 3.141592e0;

is_approx(EVAL("pi"), $PI, "pi imported by default");

#?pugs todo
eval_dies_ok("3 + pi()", "pi() is not a sub");

is_approx(EVAL("3 + pi"), $PI+3, "3+pi, as a bareword");

is_approx(EVAL("pi + 3"), $PI+3, "pi+3, as a bareword");

# vim: ft=perl6
Something went wrong with that request. Please try again.