# tensorplay.functional.frac Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.frac.html ```python tensorplay.functional.frac(input, *, out=None) → Tensor ``` Computes the fractional portion of each element in input. $$\text{out}_{i} = \text{input}_{i} - \left\lfloor |\text{input}_{i}| \right\rfloor * \operatorname{sgn}(\text{input}_{i})$$ Example: ``` >>> tensorplay.frac(tensorplay.tensor([1, 2.5, -3.2])) tensor([ 0.0000, 0.5000, -0.2000]) ```