def complex_negate_impl(context, builder, sig, args): from numba.cpython import mathimpl [typ] = sig.args [val] = args cmplx = context.make_complex(builder, typ, value=val) res = context.make_complex(builder, typ) res.real = mathimpl.negate_real(builder, cmplx.real) res.imag = mathimpl.negate_real(builder, cmplx.imag) res = res._getvalue() return impl_ret_untracked(context, builder, sig.return_type, res)
def complex_conjugate_impl(context, builder, sig, args): from numba.cpython import mathimpl z = context.make_complex(builder, sig.args[0], args[0]) z.imag = mathimpl.negate_real(builder, z.imag) res = z._getvalue() return impl_ret_untracked(context, builder, sig.return_type, res)
def real_negate_impl(context, builder, sig, args): from numba.cpython import mathimpl res = mathimpl.negate_real(builder, args[0]) return impl_ret_untracked(context, builder, sig.return_type, res)