From d0407f5726161f5787768264e740d55a4da342d7 Mon Sep 17 00:00:00 2001 From: Justin Trausch Date: Wed, 7 Feb 2024 21:17:53 +0100 Subject: [PATCH] =?UTF-8?q?Beim=20bitshift=20erg=C3=A4nzt=20falls=20der=20?= =?UTF-8?q?Fall=20eintreten=20w=C3=BCrde=20das=20der=20Exponnent=200=20w?= =?UTF-8?q?=C3=A4re?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/divsion.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/divsion.c b/src/divsion.c index e4e06fb..5f1dcbd 100644 --- a/src/divsion.c +++ b/src/divsion.c @@ -19,5 +19,8 @@ double divisionDouble(double a, double b) { } int divisionByTwo(int a, int b) { + if (b == 0){ + return a; +} return a >> b; }