用户工具

站点工具

Action disabled: source

reference: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

reference/language/fma.txt · 最后更改: 2023/06/07 04:23 由 127.0.0.1