Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我怎样才能做一个平方根Real(Real128)?
Real(Real128)
您只需使用通用函数sqrt,它就会调用正确的特定函数qsqrt(不确定这是否是标准名称。ifort 和 gfortran 都这么称呼它)。但是,您的编译器可能还没有实现它。我知道 ifort 可以,但 gfortran 没有。这也适用于其他内在函数,例如三角函数。
sqrt
qsqrt
此外,四精度运算通常在软件中执行,因此速度要慢得多。