nanf flash校验_C ++中带有示例的nanf()函数
nanf flash校验
C ++ Nanf()函数 (C++ nanf() function)
nanf() function is a library function of cmath header, it is used to get the NaN value of type float. It accepts an argument (which is an implementation-specific C String – to get NaN value we have to pass an empty string), it returns NaN value of type float.
nanf()函数是cmath标头的库函数,用于获取float类型的NaN值。 它接受一个参数(它是特定于实现的C字符串-要获取NaN值,我们必须传递一个空字符串),它返回float类型的NaN值。
Not-A-Number (NaN) values are used to check whether the value is an unidentified/non-representable or not? For example, the square root of a negative number is unidentified.
非数字(NaN)值用于检查该值是否为未识别/不可代表? 例如,负数的平方根不确定。
Syntax of nanf() function:
nanf()函数的语法:
C++11:
C ++ 11:
float nanf (const char* tagp);
Parameter(s):
参数:
tagp – represents an implementation-specific C-String.
tagp –表示特定于实现的C-String。
Return value:
返回值:
The return type of this method is float, it returns NaN value.
此方法的返回类型为float ,它返回NaN值。
Example:
例:
Function call:
nanf("");
Output:
nan
C ++代码演示nanf()函数的示例 (C++ code to demonstrate the example of nanf() function)
// C++ code to demonstrate the example of
// nanf() function
#include <iostream>
#include <cmath>
using namespace std;
// main() section
int main()
{
float nanValue;
//generating generic NaN value
//by passing an empty string
nanValue = nanf("");
//printing the value
cout << "nanValue: " << nanValue << endl;
return 0;
}
Output
输出量
nanValue: nan
Reference: C++ nanf() function
参考: C ++ nanf()函数
翻译自: https://www.includehelp.com/cpp-tutorial/nanf-function-with-example.aspx
nanf flash校验
nanf flash校验_C ++中带有示例的nanf()函数相关推荐
- c++ cdi+示例_C ++中带有示例的本地类
c++ cdi+示例 C ++中的本地类 (Local Class in C++) In C++, generally a class is declared outside of the main( ...
- c语言atoll函数怎么用_C ++中带有示例的atoll()函数
c语言atoll函数怎么用 C ++ Atoll()函数 (C++ atoll() function) atoll() function is a library function of cstdli ...
- c++ abort 函数_C ++中带有示例的abort()函数
c++ abort 函数 C ++ abort()函数 (C++ abort() function) abort() function is a library function of cstdlib ...
- c语言 函数的参数传递示例_C ++中带有示例的nearint()函数
c语言 函数的参数传递示例 C ++附近的int()函数 (C++ nearbyint() function) nearbyint() function is a library function o ...
- python sep函数_Python中带有print()函数的sep参数
python sep函数 sep parameter stands for separator, it uses with the print() function to specify the se ...
- c语言中swap函数_C ++中的swap()函数
c语言中swap函数 介绍 (Introduction) In this tutorial, we are going to learn the swap() function in C++ prog ...
- c语言中exit函数_C ++中的exit()函数
c语言中exit函数 介绍 (Introduction) Today we'll learn about exit() in C++. We know we can break out of loop ...
- c语言 函数的参数传递示例_C语言中带有示例的remove()函数
c语言 函数的参数传递示例 C语言中的remove()函数 (remove() function in C) The remove() function is defined in the <s ...
- c语言getchar函数_C语言中带有示例的getchar()函数
c语言getchar函数 C语言中的getchar()函数 (getchar() function in C) The getchar() function is defined in the < ...
最新文章
- android仿支付宝弹窗,【转】MUI自定义底部弹窗自带遮罩层仿支付宝支付弹窗
- 叛乱2正版怎么创服务器,Insurgency Linux Server 叛乱2创建服务器教程(转steam指南)
- dw相对路径怎么改_密云ETL怎么收费
- 魔法师突然出现的C++
- jmeter简单使用
- OpenJDK 14 与 OpenJDK 8 及多个主要版本的性能基准测试对比
- MS SQL SERVER中的临时表
- 如何优化ASP.NET网站的性能
- minimax算法_使用Minimax算法玩策略游戏
- 7-5 华氏度转摄氏度(四舍五入) (5分) java pta
- ai人工智能让女神_人工智能可能只会让你兴奋不已
- Python学习之路,简单的注册登录小屁程序
- 多个订单待付款半小时倒计时功能
- 前端处理订单支付超时
- 躲猫猫正式上线“Peek-a-Boo”就是“躲猫猫”
- Django - 应用及分布式路由
- python批量检索文献pubmed_PubMed快速检索文献,学学这些技巧!
- J8583CN解析ISO8583协议报文注意点
- StoneTab标签页CAD插件 2.6.0
- SWF代码分析与破解之路 (YueTai VIP视频信息获取工具) Socket续篇