logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

nan.3p (2786B)


  1. '\" et
  2. .TH NAN "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. nan,
  12. nanf,
  13. nanl
  14. \(em return quiet NaN
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <math.h>
  19. .P
  20. double nan(const char *\fItagp\fP);
  21. float nanf(const char *\fItagp\fP);
  22. long double nanl(const char *\fItagp\fP);
  23. .fi
  24. .SH DESCRIPTION
  25. The functionality described on this reference page is aligned with the
  26. ISO\ C standard. Any conflict between the requirements described here and the
  27. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  28. .P
  29. The function call \fInan\fR("\fIn-char-sequence\fR") shall be
  30. equivalent to:
  31. .sp
  32. .RS 4
  33. .nf
  34. strtod("NAN(\fIn-char-sequence\fP)", (char **) NULL);
  35. .fi
  36. .P
  37. .RE
  38. .P
  39. The function call \fInan\fR("\|") shall be equivalent to:
  40. .sp
  41. .RS 4
  42. .nf
  43. strtod("NAN()", (char **) NULL)
  44. .fi
  45. .P
  46. .RE
  47. .P
  48. If
  49. .IR tagp
  50. does not point to an
  51. .IR n -\c
  52. .BR char
  53. sequence or an empty string, the function call shall be equivalent to:
  54. .sp
  55. .RS 4
  56. .nf
  57. strtod("NAN", (char **) NULL)
  58. .fi
  59. .P
  60. .RE
  61. .P
  62. Function calls to
  63. \fInanf\fR()
  64. and
  65. \fInanl\fR()
  66. are equivalent to the corresponding function calls to
  67. \fIstrtof\fR()
  68. and
  69. \fIstrtold\fR().
  70. .SH "RETURN VALUE"
  71. These functions shall return a quiet NaN, if available, with content
  72. indicated through
  73. .IR tagp .
  74. .P
  75. If the implementation does not support quiet NaNs, these functions
  76. shall return zero.
  77. .SH ERRORS
  78. No errors are defined.
  79. .LP
  80. .IR "The following sections are informative."
  81. .SH EXAMPLES
  82. None.
  83. .SH "APPLICATION USAGE"
  84. None.
  85. .SH RATIONALE
  86. None.
  87. .SH "FUTURE DIRECTIONS"
  88. None.
  89. .SH "SEE ALSO"
  90. .IR "\fIstrtod\fR\^(\|)"
  91. .P
  92. The Base Definitions volume of POSIX.1\(hy2017,
  93. .IR "\fB<math.h>\fP"
  94. .\"
  95. .SH COPYRIGHT
  96. Portions of this text are reprinted and reproduced in electronic form
  97. from IEEE Std 1003.1-2017, Standard for Information Technology
  98. -- Portable Operating System Interface (POSIX), The Open Group Base
  99. Specifications Issue 7, 2018 Edition,
  100. Copyright (C) 2018 by the Institute of
  101. Electrical and Electronics Engineers, Inc and The Open Group.
  102. In the event of any discrepancy between this version and the original IEEE and
  103. The Open Group Standard, the original IEEE and The Open Group Standard
  104. is the referee document. The original Standard can be obtained online at
  105. http://www.opengroup.org/unix/online.html .
  106. .PP
  107. Any typographical or formatting errors that appear
  108. in this page are most likely
  109. to have been introduced during the conversion of the source files to
  110. man page format. To report such errors, see
  111. https://www.kernel.org/doc/man-pages/reporting_bugs.html .