Element-wise fused divide-add.
Computes in
one expression. Common in optimiser updates (e.g. Adam's
parameter step uses the form param -= lr * m / sqrt(v)).
Parameters
Returns
TensorTensor with the broadcast shape of the inputs.
Notes
Element-wise definition:
Division by zero follows standard IEEE 754 rules — no clamping is applied. Gradients flow through all three tensor operands.
Examples
>>> import lucid
>>> a = lucid.tensor([1.0, 2.0])
>>> t1 = lucid.tensor([4.0, 9.0])
>>> t2 = lucid.tensor([2.0, 3.0])
>>> lucid.addcdiv(a, t1, t2, value=0.5)
Tensor([2. , 3.5])