【发布时间】:2021-12-12 22:12:19
【问题描述】:
所以我尝试使用__float128-type 在 C 中进行非常精确的数学运算。
我的代码如下所示:
#include <stdio.h>
int main() {
__float128 num;
}
我尝试在没有任何选项的情况下编译它:
gcc -o test test.c
我得到的错误是:
test.c:4:5: error: __float128 is not supported on this target
我的 gcc 是在 x86 Macbook 上使用 Homebrew 安装的。
【问题讨论】:
-
库不仅仅是标题。标头只是库中内容的列表。它不是真正的图书馆。
-
您使用的是 Intel (x86) Mac 还是 Apple Silicon (ARM) Mac?
-
@JosephSible-ReinstateMonica 我使用的是 2019 年的 x86 MacBook Air。
-
等一下。 Libquadmath 不提供 __float128;这取决于它已经可用。 libquadmath 有什么你实际使用的东西吗?如果您只删除
#include <quadmath.h>会发生什么? -
@JosephSible-ReinstateMonica
test.c:4:5: error: __float128 is not supported on this target