Permalink
Browse files

More sqrt(2) tests.

  • Loading branch information...
1 parent 736b38b commit 949d46f42b47ec1a901b90c16371856a4579fca0 @colomon committed Mar 22, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 t/00-experiments.t
View
@@ -1,6 +1,6 @@
use Test;
-plan 14;
+plan 18;
sub make-continued-fraction (Real $x is copy) {
gather loop {
@@ -135,4 +135,7 @@ is cf-sqrt-two()[^10], make-continued-fraction(sqrt(2))[^10], "approximation for
is z(0, 1, 1, 0, 1, 0, 0, 0, cf-sqrt-two(), make-continued-fraction(1/2))[^10],
make-continued-fraction(sqrt(2)+1/2)[^10],
"Extended continued fraction addition";
-eval_dies_ok "z(0, 0, 0, 1, 1, 0, 0, 0, cf-sqrt-two(), cf-sqrt-two())", "sqrt(2)^2 cannot be calculated";
+is z(0, 1, 1, 0, 1, 0, 0, 0, cf-sqrt-two(), cf-sqrt-two())[^10],
+ make-continued-fraction(sqrt(2)*2)[^10],
+ "Extended continued fraction addition";
+eval_dies_ok "z(0, 0, 0, 1, 1, 0, 0, 0, cf-sqrt-two(), cf-sqrt-two())[0]", "sqrt(2)^2 cannot be calculated";

0 comments on commit 949d46f

Please sign in to comment.