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 1025 : double int_power(double x, g2int y) { 12 : 13 : double value; 14 : 15 1025 : if (y < 0) { 16 4 : y = -y; 17 4 : x = 1.0 / x; 18 : } 19 1025 : value = 1.0; 20 : 21 4275 : while (y) { 22 2225 : if (y & 1) { 23 1421 : value *= x; 24 : } 25 2225 : x = x * x; 26 2225 : y >>= 1; 27 : } 28 1025 : return value; 29 : } 30 : |
![]() |
Generated by: LCOV version 1.7 |