C++ Math fma()
The function computes the expression x*y+z without losing its precision in any intermediate result.
Suppose numbers are x,y and z:
Note: If any argument is long double type, then the return type is promoted to long double. If not, then the return type is promoted to double.
x: The value which is to be multiplied.
y: The value which is to be multiplied with x.
z: The value which is to be added with the product of x and y.
It returns the result of x*y+z.
Let's see the simple example.
Values of x,y,z are :2,3,4 fma(x,y,z) : 10
In this example, fma() function computes the result of x*y+z and returns the value 10.
Next TopicC++ Math Functions
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week