arb icon indicating copy to clipboard operation
arb copied to clipboard

Implement Fused Multiply Add and Sub

Open rickyefarr opened this issue 9 years ago • 1 comments

Currently, there is a similar function arb_addmul(acb_t z, const acb_t x, const acb_t y, slong prec). This computes z = z + x_y. It would be nice to implement a function that is similar to MPFR's, mpfr_fma(w,x,y,z) where the output is w=x_y + z.

Shouldn't be too hard to adjust the current implementation of arb_addmul to do this.

rickyefarr avatar Jul 19 '16 01:07 rickyefarr

I have successfully created arf_fam (reverse of mpfr version, w=op1 + op2*op3). I also created a test function. As suspected, it's very easy to change the existing addmul code to create these functions.

If you think this would be useful to include in the library, let me know. I know that it is useful for me at least.

rickyefarr avatar Jul 20 '16 10:07 rickyefarr