问题描述
在我的问题有关,一个回答说看看 __ float128
。
我用它和编译器可以找到它,但是我不能打印它,因为编译器找不到头 quadmath.h
。
所以我的问题是:
-
__ float128
是标准的,正确吗? / li>
- 如何打印?
- 不是
quadmath.h
标准吗? >
这些答案没有帮助:
- 也没有帮助。
注意我不想使用任何非标准库。
$ b
这也是有用的,如果这个问题有答案的话,即使答案是否定的也是如此。
解决方案quadmath_snprintf 方法。在C ++中,当然可以使用<
。In my question about Analysis of float/double precision in 32 decimal digits, one answer said to take a look at
__float128
.I used it and the compiler could find it, but I can not print it, since the complier can not find the header
quadmath.h
.So my questions are:
__float128
is standard, correct?- How to print it?
- Isn't
quadmath.h
standard?
These answers did not help:
The ref also did not help.
Note that I do not want to use any non standard library.
[EDIT]
It would be also useful, if that question had an answer, even if the answer was a negative one.
解决方案No, it's not standard - neither the type nor the header. That's why the type has a double underscore (reserved name). Apparently, quadmath.h provides a
quadmath_snprintf
method. In C++ you would have used<<
, of course.这篇关于打印__float128,不使用quadmath_snprintf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!