flintlib / arb

Arb has been merged into FLINT -- use https://github.com/flintlib/flint/ instead
http://arblib.org/
GNU Lesser General Public License v2.1
457 stars 140 forks source link

Implement Fused Multiply Add and Sub #154

Open rickyefarr opened 8 years ago

rickyefarr commented 8 years ago

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 commented 8 years ago

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.