// 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_ET_HPP #define REVERSE_MODE_AUTODIFF_STL_ET_HPP #include namespace boost { namespace math { namespace differentiation { namespace reverse_mode { template fabs_expr fabs(const expression &arg) { return fabs_expr(arg, static_cast(0.0)); } template auto abs(const expression &arg) { return fabs(arg); } template ceil_expr ceil(const expression &arg) { return ceil_expr(arg, static_cast(0.0)); } template floor_expr floor( const expression &arg) { return floor_expr(arg, static_cast(0.0)); } template exp_expr exp(const expression &arg) { return exp_expr(arg, static_cast(0.0)); } template pow_expr pow( const expression &lhs, const expression &rhs) { return pow_expr(lhs, rhs); } template::value>::type> expr_pow_float_expr pow( const expression &arg, const RealType2 &v) { return expr_pow_float_expr(arg, static_cast(v)); }; template float_pow_expr_expr pow( const RealType &v, const expression &arg) { return float_pow_expr_expr(arg, v); }; template log_expr log(const expression &arg) { return log_expr(arg, static_cast(0.0)); }; template sqrt_expr sqrt(const expression &arg) { return sqrt_expr(arg, static_cast(0.0)); }; template auto 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 cos_expr cos(const expression &arg) { return cos_expr(arg, static_cast(0.0)); }; template sin_expr sin(const expression &arg) { return sin_expr(arg, static_cast(0.0)); }; template tan_expr tan(const expression &arg) { return tan_expr(arg, static_cast(0.0)); }; template acos_expr acos(const expression &arg) { return acos_expr(arg, static_cast(0.0)); }; template asin_expr asin(const expression &arg) { return asin_expr(arg, static_cast(0.0)); }; template atan_expr atan(const expression &arg) { return atan_expr(arg, static_cast(0.0)); }; template atan2_expr atan2( const expression &lhs, const expression &rhs) { return atan2_expr(lhs, rhs); } template atan2_right_float_expr atan2( const expression &arg, const RealType &v) { return atan2_right_float_expr(arg, v); }; template atan2_left_float_expr atan2( const RealType &v, const expression &arg) { return atan2_left_float_expr(arg, v); }; template trunc_expr 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 round_expr 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 sinh_expr sinh(const expression &arg) { return sinh_expr(arg, static_cast(0.0)); } template cosh_expr cosh(const expression &arg) { return cosh_expr(arg, static_cast(0.0)); } template tanh_expr tanh(const expression &arg) { return tanh_expr(arg, static_cast(0.0)); } template log10_expr log10( const expression &arg) { return log10_expr(arg, static_cast(0.0)); } template asinh_expr asinh( const expression &arg) { return asinh_expr(arg, static_cast(0.0)); } template acosh_expr acosh( const expression &arg) { return acosh_expr(arg, static_cast(0.0)); } template atanh_expr atanh( const expression &arg) { return atanh_expr(arg, static_cast(0.0)); } } // namespace reverse_mode } // namespace differentiation } // namespace math } // namespace boost #endif