commit 89898de3bfa38d39494555a3e109253489a0e0b6
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Mon Jul 25 16:56:20 2016 +0200
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Mon Jul 25 16:56:25 2016 +0200
Fix a small error in the solution for Powers of the golden ratio
Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
diff --git a/doc/exercises.tex b/doc/exercises.tex
index e89c2b3..93f77e4 100644
--- a/doc/exercises.tex
+++ b/doc/exercises.tex
_AT_@ -508,7 +508,7 @@ but for efficiency and briefness, we will use
void golden_pow(z_t r, z_t p)
\{
if (zsignum(p) <= 0)
- zsetu(r, zzero(p));
+ zsetu(r, zcmpi(p, -1) >= 0);
else
lucas(r, p);
\}
Received on Mon Jul 25 2016 - 16:57:13 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 25 2016 - 17:00:34 CEST