MCPcopy Create free account
hub / github.com/covscript/covscript / operator^

Function operator^

include/covscript/core/components.hpp:436–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434 }
435
436 numeric operator^(const numeric &rhs) const noexcept
437 {
438 switch (get_composite_type(type, rhs.type)) {
439 default:
440 case 0b00:
441 return std::pow(data._num, rhs.data._num);
442 case 0b01:
443 return std::pow(data._num, rhs.data._int);
444 case 0b10:
445 return std::pow(data._int, rhs.data._num);
446 case 0b11:
447 return int_pow(data._int, rhs.data._int);
448 }
449 }
450
451 template <typename T, typename = std::enable_if_t<!std::is_same<std::decay_t<T>, numeric>::value>>
452 numeric operator^(T &&rhs) const noexcept

Callers

nothing calls this directly

Calls 2

int_powFunction · 0.85
powFunction · 0.50

Tested by

no test coverage detected