// Copyright Maksym Zhelyeznyakov 2025-2026. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) #ifndef REVERSE_MODE_AUTODIFF_STL_NO_ET_HPP #define REVERSE_MODE_AUTODIFF_STL_NO_ET_HPP #include namespace boost { namespace math { namespace differentiation { namespace reverse_mode { template rvar fabs(const expression &arg) { return fabs_expr(arg, static_cast(0.0)); } template rvar abs(const expression &arg) { return fabs(arg); } template rvar ceil(const expression &arg) { return ceil_expr(arg, static_cast(0.0)); } template rvar floor(const expression &arg) { return floor_expr(arg, static_cast(0.0)); } template rvar exp(const expression &arg) { return exp_expr(arg, static_cast(0.0)); } template rvar pow(const expression &lhs, const expression &rhs) { return pow_expr(lhs, rhs); } template::value>::type> rvar pow(const expression &arg, const RealType2 &v) { return expr_pow_float_expr(arg, static_cast(v)); }; template rvar pow(const RealType &v, const expression &arg) { return float_pow_expr_expr(arg, v); }; template rvar log(const expression &arg) { return log_expr(arg, static_cast(0.0)); }; template rvar sqrt(const expression &arg) { return sqrt_expr(arg, static_cast(0.0)); }; template rvar frexp(const expression &arg, int *i) { BOOST_MATH_STD_USING frexp(arg.evaluate(), i); return arg / pow(static_cast(2.0), *i); } template auto ldexp(const expression &arg, const int &i) { BOOST_MATH_STD_USING return arg * pow(static_cast(2.0), i); } template rvar cos(const expression &arg) { return cos_expr(arg, static_cast(0.0)); }; template rvar sin(const expression &arg) { return sin_expr(arg, static_cast(0.0)); }; template rvar tan(const expression &arg) { return tan_expr(arg, static_cast(0.0)); }; template rvar acos(const expression &arg) { return acos_expr(arg, static_cast(0.0)); }; template rvar asin(const expression &arg) { return asin_expr(arg, static_cast(0.0)); }; template rvar atan(const expression &arg) { return atan_expr(arg, static_cast(0.0)); }; template rvar atan2(const expression &lhs, const expression &rhs) { return atan2_expr(lhs, rhs); } template rvar atan2(const expression &arg, const RealType &v) { return atan2_right_float_expr(arg, v); }; template rvar atan2(const RealType &v, const expression &arg) { return atan2_left_float_expr(arg, v); }; template rvar trunc(const expression &arg) { return trunc_expr(arg, static_cast(0.0)); } template auto fmod(const expression &lhs, const expression &rhs) { return fmod_expr(lhs, rhs); } template auto fmod(const expression &lhs, const RealType rhs) { return fmod_right_float_expr(lhs, rhs); } template auto fmod(const RealType lhs, const expression &rhs) { return fmod_left_float_expr(rhs, lhs); } template rvar round(const expression &arg) { return round_expr(arg, static_cast(0.0)); } template int iround(const expression &arg) { rvar tmp = arg.evaluate(); return iround(tmp.item()); } template long lround(const expression &arg) { BOOST_MATH_STD_USING rvar tmp = arg.evaluate(); return lround(tmp.item()); } template long long llround(const expression &arg) { rvar tmp = arg.evaluate(); return llround(tmp.item()); } template int itrunc(const expression &arg) { rvar tmp = arg.evaluate(); return itrunc(tmp.item()); } template long ltrunc(const expression &arg) { rvar tmp = arg.evaluate(); return ltrunc(tmp.item()); } template long long lltrunc(const expression &arg) { rvar tmp = arg.evaluate(); return lltrunc(tmp.item()); } template rvar sinh(const expression &arg) { return sinh_expr(arg, static_cast(0.0)); } template rvar cosh(const expression &arg) { return cosh_expr(arg, static_cast(0.0)); } template rvar tanh(const expression &arg) { return tanh_expr(arg, static_cast(0.0)); } template rvar log10(const expression &arg) { return log10_expr(arg, static_cast(0.0)); } template rvar asinh(const expression &arg) { return asinh_expr(arg, static_cast(0.0)); } template rvar acosh(const expression &arg) { return acosh_expr(arg, static_cast(0.0)); } template rvar atanh(const expression &arg) { return atanh_expr(arg, static_cast(0.0)); } } // namespace reverse_mode } // namespace differentiation } // namespace math } // namespace boost #endif