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