aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoelle Maslak <jmaslak@antelope.net>2019-04-29 00:06:42 -0600
committerJoelle Maslak <jmaslak@antelope.net>2019-04-29 00:06:42 -0600
commitd3f8dcef51c45538e3be8255bd7064fc782cb48c (patch)
tree3426acbec07bfbb7e9423f7cf7aa0318916d8d9c
parent139e5f886bf93b64f3485acb4fadf8c7f3254456 (diff)
downloadperlweeklychallenge-club-d3f8dcef51c45538e3be8255bd7064fc782cb48c.tar.gz
perlweeklychallenge-club-d3f8dcef51c45538e3be8255bd7064fc782cb48c.tar.bz2
perlweeklychallenge-club-d3f8dcef51c45538e3be8255bd7064fc782cb48c.zip
Add Perl6 solution to Week 6, Problem 2
-rwxr-xr-xchallenge-006/joelle-maslak/perl6/ch-2.p616
1 files changed, 16 insertions, 0 deletions
diff --git a/challenge-006/joelle-maslak/perl6/ch-2.p6 b/challenge-006/joelle-maslak/perl6/ch-2.p6
new file mode 100755
index 0000000000..01632f9cc7
--- /dev/null
+++ b/challenge-006/joelle-maslak/perl6/ch-2.p6
@@ -0,0 +1,16 @@
+#!/usr/bin/env perl6
+use v6;
+
+#
+# Copyright © 2019 Joelle Maslak
+# All Rights Reserved - See License
+#
+# I am assuming that we really wanted Ramanujan's Constant, and not the
+# linked to Wiki page on the Landau-Ramanujan Constant which is
+# something else entirely!
+#
+# Checked against http://oeis.org/A060295
+
+# We'll give *33* digits of precison, not 32. ;)
+say (640320³ + 744 - 196844.FatRat/(640320³ + 744)).Str.substr(0,34);
+