MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / power

Function power

Examples/NoModules/Appendix A/ExA_09A/Power.cpp:12–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10}
11
12double power(double x, int n) // power() has external linkage
13{
14 return n >= 0 ? localHelper(x, static_cast<unsigned>(n))
15 : 1.0 / localHelper(x, static_cast<unsigned>(-n));
16}

Callers

nothing calls this directly

Calls 1

localHelperFunction · 0.70

Tested by

no test coverage detected