diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/c/numeric%2Fmath%2Fislessequal.html | |
new repository
Diffstat (limited to 'devdocs/c/numeric%2Fmath%2Fislessequal.html')
| -rw-r--r-- | devdocs/c/numeric%2Fmath%2Fislessequal.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/devdocs/c/numeric%2Fmath%2Fislessequal.html b/devdocs/c/numeric%2Fmath%2Fislessequal.html new file mode 100644 index 00000000..588f3473 --- /dev/null +++ b/devdocs/c/numeric%2Fmath%2Fislessequal.html @@ -0,0 +1,41 @@ + <h1 id="firstHeading" class="firstHeading">islessequal</h1> <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code><math.h></code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl t-since-c99"> <td> <pre data-language="c">#define islessequal(x, y) /* implementation defined */</pre> +</td> <td class="t-dcl-nopad"> </td> <td> <span class="t-mark-rev t-since-c99">(since C99)</span> </td> </tr> </table> <p>Determines if the floating point number <code>x</code> is less than or equal to the floating-point number <code>y</code>, without setting floating-point exceptions.</p> +<h3 id="Parameters"> Parameters</h3> <table class="t-par-begin"> <tr class="t-par"> <td> x </td> <td> - </td> <td> floating point value </td> +</tr> <tr class="t-par"> <td> y </td> <td> - </td> <td> floating point value </td> +</tr> +</table> <h3 id="Return_value"> Return value</h3> <p>Nonzero integral value if <code>x <= y</code>, <code>0</code> otherwise.</p> +<h3 id="Notes"> Notes</h3> <p>The built-in <code>operator<=</code> for floating-point numbers may raise <code><a href="../fenv/fe_exceptions" title="c/numeric/fenv/FE exceptions">FE_INVALID</a></code> if one or both of the arguments is NaN. This function is a "quiet" version of <code>operator<=</code>.</p> +<h3 id="Example"> Example</h3> <div class="t-example"> <div class="c source-c"><pre data-language="c">#include <stdio.h> +#include <math.h> + +int main(void) +{ + printf("islessequal(2.0,1.0) = %d\n", islessequal(2.0,1.0)); + printf("islessequal(1.0,2.0) = %d\n", islessequal(1.0,2.0)); + printf("islessequal(1.0,1.0) = %d\n", islessequal(1.0,1.0)); + printf("islessequal(INFINITY,1.0) = %d\n", islessequal(INFINITY,1.0)); + printf("islessequal(1.0,NAN) = %d\n", islessequal(1.0,NAN)); + + return 0; +}</pre></div> <p>Possible output:</p> +<div class="text source-text"><pre data-language="c">islessequal(2.0,1.0) = 0 +islessequal(1.0,2.0) = 1 +islessequal(1.0,1.0) = 1 +islessequal(INFINITY,1.0) = 0 +islessequal(1.0,NAN) = 0</pre></div> </div> <h3 id="References"> References</h3> <ul> +<li> C11 standard (ISO/IEC 9899:2011): </li> +<ul> +<li> 7.12.14.4 The islessequal macro (p: 260) </li> +<li> F.10.11 Comparison macros (p: 531) </li> +</ul> +<li> C99 standard (ISO/IEC 9899:1999): </li> +<ul><li> 7.12.14.4 The islessequal macro (p: 241) </li></ul> +</ul> <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td> <div><a href="isgreaterequal" title="c/numeric/math/isgreaterequal"> <span class="t-lines"><span>isgreaterequal</span></span></a></div> +<div><span class="t-lines"><span><span class="t-mark-rev t-since-c99">(C99)</span></span></span></div> </td> <td> checks if the first floating-point argument is greater or equal than the second <br> <span class="t-mark">(function macro)</span> </td> +</tr> <tr class="t-dsc"> <td colspan="2"> <span><a href="https://en.cppreference.com/w/cpp/numeric/math/islessequal" title="cpp/numeric/math/islessequal">C++ documentation</a></span> for <code>islessequal</code> </td> +</tr> </table> <div class="_attribution"> + <p class="_attribution-p"> + © cppreference.com<br>Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.<br> + <a href="https://en.cppreference.com/w/c/numeric/math/islessequal" class="_attribution-link">https://en.cppreference.com/w/c/numeric/math/islessequal</a> + </p> +</div> |
