@ -33,3 +33,12 @@ double* division_double(double dividend, double divisor) {
*result = dividend / divisor;
return result;
}
float* division_float(float dividend, float divisor) {
if(divisor == 0) {
return NULL;
float* result = malloc(sizeof(float));
@ -7,4 +7,6 @@ long* division_long(long, long);
double* division_double(double, double);
float* division_float(float, float);
#endif //THEADMIRALS_ARITHMETICDIVISION_H