diff options
| author | Mattias Andrée <maandree@kth.se> | 2016-07-25 16:56:20 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2016-07-25 16:56:25 +0200 |
| commit | 89898de3bfa38d39494555a3e109253489a0e0b6 (patch) | |
| tree | 303f8bcafac19ab07dd2b183809dff338a62e9a4 /doc/exercises.tex | |
| parent | Fix typo (diff) | |
| download | libzahl-89898de3bfa38d39494555a3e109253489a0e0b6.tar.gz libzahl-89898de3bfa38d39494555a3e109253489a0e0b6.tar.bz2 libzahl-89898de3bfa38d39494555a3e109253489a0e0b6.tar.xz | |
Fix a small error in the solution for Powers of the golden ratio
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'doc/exercises.tex')
| -rw-r--r-- | doc/exercises.tex | 2 |
1 files changed, 1 insertions, 1 deletions
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); \} |
