#include "ft_math.h"
#include <limits.h>
#include <stdint.h>
Go to the source code of this file.
◆ can_mul()
| bool can_mul |
( |
int |
a, |
|
|
int |
b |
|
) |
| |
Definition at line 18 of file can_mul.c.
22 else if ((0 < a && 0 < b) || (a < 0 && b < 0))
23 return (b <= (INT_MAX / a));
25 return ((INT_MIN / a) <= b);
27 return ((INT_MIN / b) <= a);
◆ can_mull()
| bool can_mull |
( |
long |
a, |
|
|
long |
b |
|
) |
| |
Definition at line 38 of file can_mul.c.
42 else if ((0 < a && 0 < b) || (a < 0 && b < 0))
43 return (b <= (LONG_MAX / a));
45 return ((LONG_MIN / a) <= b);
47 return ((LONG_MIN / b) <= a);
◆ can_mulp()
| bool can_mulp |
( |
size_t |
a, |
|
|
size_t |
b |
|
) |
| |
Definition at line 50 of file can_mul.c.
55 return (b <= (UINTPTR_MAX / a));
◆ can_mulu()
| bool can_mulu |
( |
unsigned int |
a, |
|
|
unsigned int |
b |
|
) |
| |
Definition at line 30 of file can_mul.c.
35 return (b <= (UINT_MAX / a));