Is there a function for taking absolute values in ciphertext

Is there a function for taking absolute values in ciphertext?

Is there a function to sum the ciphertext content of a batch?
such as
batchsize=5;
v={1,2,3,4,5}
v1=MakePackedPlaintext(v)
cpv=encryption(v1)
a function like sum(cpv) =encryption(MakePackedPlaintext(1))+encryption(MakePackedPlaintext(2))+…+encryption(MakePackedPlaintext(5));

Is there a function for taking absolute values in ciphertext?

One option is to use the algorithm described in Section 3.2 of Numerical Method for Comparison on Homomorphically Encrypted Numbers (this is in the context of the CKKS scheme). For the square root function, one could also use the Chebyshev series interpolation (EvalChebyshevFunction in OpenFHE).

The other alternative is to use FHEW/TFHE bootstrapping to evaluate a lookup table for the absolute value function, as described in Large-Precision Homomorphic Sign Evaluation using FHEW/TFHE Bootstrapping.

Is there a function to sum the ciphertext content of a batch?

EvalSum in OpenFHE can be used for this purpose. The batch size should be a power of two (8 in this case).