创客百科

姿势共享,有节操无门槛参与的创客百科,创客动力之源 \ (^_^) /

用户工具

站点工具


arduino:language:fma

fma()

例子

double c = fma(2, 3, 4);  // Sets c to 2 * 3 + 4

描述

fma(x, y, z) 功能使用了浮点型数字的加乘运算 (x * y) + z,中间的运算结果并不是最终类型. 这样有时可以提高计算精度。

语法

fma(x, y, x)

参数
        x	double, float or int
        y	double, float or int
        z	double, float or int

返回 double

本页面的其他翻译:
arduino/language/fma.txt · 最后更改: 2016/12/25 22:15 (外部编辑)