From 89898de3bfa38d39494555a3e109253489a0e0b6 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 25 Jul 2016 16:56:20 +0200 Subject: Fix a small error in the solution for Powers of the golden ratio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- doc/exercises.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/exercises.tex b/doc/exercises.tex index e89c2b3..93f77e4 100644 --- a/doc/exercises.tex +++ b/doc/exercises.tex @@ -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); \} -- cgit v1.2.3-70-g09d2