LCOV - code coverage report | |||||||||||||||||||||||
![]() | |||||||||||||||||||||||
|
|||||||||||||||||||||||
![]() |
1 : #include "grib2.h" 2 : /* 3 : * w. ebisuzaki 4 : * 5 : * return x**y 6 : * 7 : * 8 : * input: double x 9 : * int y 10 : */ 11 1535 : double int_power(double x, g2int y) { 12 : 13 : double value; 14 : 15 1535 : if (y < 0) { 16 5 : y = -y; 17 5 : x = 1.0 / x; 18 : } 19 1535 : value = 1.0; 20 : 21 6406 : while (y) { 22 3336 : if (y & 1) { 23 2163 : value *= x; 24 : } 25 3336 : x = x * x; 26 3336 : y >>= 1; 27 : } 28 1535 : return value; 29 : } 30 : |
![]() |
Generated by: LCOV version 1.7 |