Tools/NetTest - Add TCP retransmit test
[tpg/acess2.git] / Usermode / Libraries / libm.so_src / pow.c
1 /*
2  * Acess2 C Library (Maths)
3  * - By John Hodge (thePowersGang)
4  *
5  * pow.c
6  * - pow(), powf() and powl()
7  */
8 #include <math.h>
9
10 // === CODE ===
11 double pow(double x, double y)
12 {
13         if( x == 1.0f )
14                 return 1.0f;
15         if( y == 0.0f )
16                 return 1.0f;
17         return __builtin_pow(x,y);
18 }
19
20 double exp(double y)
21 {
22         if( y == 0.0f )
23                 return 1.0f;
24         return __builtin_exp(y);
25 }
26
27 double log(double n)
28 {
29         if(n == 1.0f)
30                 return 0.0f;
31         return __builtin_log(n);
32 }

UCC git Repository :: git.ucc.asn.au