-
Notifications
You must be signed in to change notification settings - Fork 12
/
ft_pow.c
18 lines (16 loc) · 1012 Bytes
/
ft_pow.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_pow.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apuchill <apuchill@student.42sp.org.br> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/31 02:41:45 by apuchill #+# #+# */
/* Updated: 2020/10/31 02:41:54 by apuchill ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
long double ft_pow(long double n, unsigned int pow)
{
return (pow ? n * ft_pow(n, pow - 1) : 1);
}