-
Notifications
You must be signed in to change notification settings - Fork 1
/
ft_pow.c
20 lines (18 loc) · 1.01 KB
/
ft_pow.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_bzero.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yuotsuka <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/18 21:59:29 by yuotsuka #+# #+# */
/* Updated: 2024/10/20 20:00:01 by yuotsuka ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
long double ft_pow(long double n, unsigned int pow)
{
if (pow == 0)
return (1);
return (n * ft_pow(n, pow - 1));
}