1#ifndef SXEVAL_OPERATIONS_LOGARITHM2_HPP
2#define SXEVAL_OPERATIONS_LOGARITHM2_HPP
16 static constexpr const char*
KEY =
"log2";
40 this->_result =
static_cast<T
>(std::log2(this->_args.front().get()));
The AOperation class is an abstract base class for operations in the SXEval library.
Definition AOperation.hpp:22
The IInstruction class is an interface for any instructions.
Definition IInstruction.hpp:21
Definition Logarithm2.hpp:14
std::string toString() const override
String representation of the instruction.
Definition Logarithm2.hpp:25
static constexpr const char * KEY
Definition Logarithm2.hpp:16
static constexpr const int ARITY_MIN
Definition Logarithm2.hpp:17
void execute() override
Execute the operation.
Definition Logarithm2.hpp:39
static constexpr const int ARITY_MAX
Definition Logarithm2.hpp:18
Logarithm2(const std::vector< IInstruction< T > * > &args)
Definition Logarithm2.hpp:20
Definition AOperation.hpp:8
std::enable_if< std::is_unsigned< T >::value, T >::type Absolute(const T &a)
Perform an absolute value operation on types T.
Definition utils.hpp:262