Skip to content

Commit a4d1219

Browse files
Refine isgreaterequal() documentation
Updated the description and notes for clarity and accuracy.
1 parent 2916892 commit a4d1219

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

content/cpp/concepts/math-functions/terms/isgreaterequal/isgreaterequal.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
---
22
Title: 'isgreaterequal()'
3-
Description: 'Determines if the floating-point number `x` is greater than or equal to the floating-point number `y`, without setting floating-point exceptions.'
3+
Description: 'Determines whether the first floating-point value is greater than or equal to the second, without raising floating-point exceptions.'
44
Subjects:
5-
5+
- 'Computer Science'
6+
- 'Game Development'
67
Tags:
78
- 'Functions'
8-
- 'Comparison'
99
- 'Math'
1010
CatalogContent:
1111
- 'learn-c-plus-plus'
12+
- 'paths/computer-science'
1213
---
1314

14-
The **`isgreaterequal()`** [function](https://www.codecademy.com/resources/docs/cpp/functions) compares two floating-point values and returns `true` only when the first is greater than or equal to the second. Never raises floating-point exceptions, and always returns `false` if one or both arguments is `NaN`. The function is available through the `<cmath>` header.
15+
The **`isgreaterequal()`** [function](https://www.codecademy.com/resources/docs/cpp/functions) compares two arithmetic values and returns `true` only when the first is greater than or equal to the second. It never raises floating-point exceptions and always returns `false` if either argument is `NaN`. The function is available through the `<cmath>` header.
1516

1617
## Syntax
1718

18-
```
19+
```pseudo
1920
isgreaterequal(x, y)
2021
```
2122

2223
**Parameters:**
2324

24-
- `x`, `y`: floating-point or integers types.
25-
25+
- `x`, `y`: Floating-point or integers types.
2626

27-
> **Notes:**
28-
> + The function `isgreaterequal()`is defined with overloads so it works with any mix of arithmetic values.
29-
> + The built-in operator>= for floating-point numbers may raise `FE_INVALID` if one or both of the arguments is NaN. The function `isgreaterequal()` is a "quiet" version of operator>=.
27+
> **Notes:**
28+
>
29+
> - The function `isgreaterequal()` is defined with overloads so it works with any mix of arithmetic values.
30+
> - The built-in operator `>=` for floating-point numbers may raise `FE_INVALID` if one or both of the arguments is `NaN`. The function `isgreaterequal()` is a "quiet" version of operator `>=`.
3031
3132
**Return value:**
3233

@@ -64,7 +65,7 @@ The output of this code is as follows:
6465
```shell
6566
5.5 isgreaterequal to 3: true
6667
3 isgreaterequal to 5.5: false
67-
5.5 isgreaterequal to nan: false
68+
5.5 isgreaterequal to nan: false (NaN comparison)
6869
```
6970

7071
## Codebyte Example

0 commit comments

Comments
 (0)