SyTen

◆ log2()

STensor syten::STensorImpl::log2 ( STensor  in)

Takes the 2 logarithm of a rank 0 STensor.

Given a real rank-0 STensor, returns its base-2 logarithm.

Remarks
Check in with Claudius whether this is auto differentiable
This function is autodifferentiable.
This function asserts that its argument is real, as the complex case is not handled by the autodifferentiation.

References syten::STensorImpl::STensor::autodiff_enabled(), syten::STensorImpl::STensor::get_and_renew_autodiff(), if_constexpr, imag(), std::log(), syten::STensorImpl::STensor::rank(), real(), syten::STensorImpl::STensor::set_autodiff_node(), SYTEN_ASSERT, SYTEN_TENSOR_RANK, and syten::STensorImpl::STensor::visit().

Referenced by syten::closest_power_two(), syten::Tensor< rank >::reduce(), and syten::von_neumann_entropy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: