diff options
| author | Mattias Andrée <maandree@kth.se> | 2016-04-27 17:19:53 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2016-04-27 17:19:53 +0200 |
| commit | e746f06265981fd17bc656ca59e0ed82f6cea84d (patch) | |
| tree | 9161d4428b889f7aa4375988c4fdc29e1ab02ee2 /src/zmodpowu.c | |
| parent | Minor word fix in STATUS (diff) | |
| download | libzahl-e746f06265981fd17bc656ca59e0ed82f6cea84d.tar.gz libzahl-e746f06265981fd17bc656ca59e0ed82f6cea84d.tar.bz2 libzahl-e746f06265981fd17bc656ca59e0ed82f6cea84d.tar.xz | |
Add option UNSAFE which disables all internal error checks
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/zmodpowu.c')
| -rw-r--r-- | src/zmodpowu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zmodpowu.c b/src/zmodpowu.c index fd5e925..7bb4f2b 100644 --- a/src/zmodpowu.c +++ b/src/zmodpowu.c @@ -9,14 +9,14 @@ void zmodpowu(z_t a, z_t b, unsigned long long int c, z_t d) { if (unlikely(!c)) { - if (zzero(b)) + if (check(zzero(b))) libzahl_failure(-ZERROR_0_POW_0); - else if (zzero(d)) + else if (check(zzero(d))) libzahl_failure(-ZERROR_DIV_0); else zsetu(a, 1); return; - } else if (unlikely(zzero(d))) { + } else if (check(unlikely(zzero(d)))) { libzahl_failure(-ZERROR_DIV_0); } else if (unlikely(zzero(b))) { SET_SIGNUM(a, 0); |
