File: pow.c

package info (click to toggle)
libffm 0.28-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 220 kB
  • ctags: 185
  • sloc: asm: 3,028; makefile: 95; ansic: 12; sh: 2
file content (21 lines) | stat: -rw-r--r-- 523 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
   Simple helper function to replace - without source changes - all calls to 
   pow by calls to the much faster (but less accurate) powr function defined 
   in the libffm library.
   
   Link with your files before referencing the math library, i.e. change for 
   example:
   
   > gcc/g77 myapp.x sub1.x sub2.x ... -o myapp ... -lf2c -lm

   	to
   
   > gcc/g77 myapp.x sub1.x sub2.x ... pow.o -o myapp ... -lf2c -lffm -lm
*/

double powr(double, double);

double pow(double x, double y)
{
    return powr(x, y);
}