File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
content/cpp/concepts/math-functions/terms/islessgreater Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11---
22Title : ' islessgreater()'
3- Description : ' Determines whether a floating-point value is less than or greater than another without setting floating-point exceptions .'
3+ Description : ' Determines if a value is less than or greater than another.'
44Subjects :
55 - ' Computer Science'
66Tags :
@@ -40,11 +40,11 @@ using namespace std;
4040int main () {
4141 double x = 5.0;
4242 double y = 10.0;
43-
43+
4444 cout << "islessgreater(5.0, 10.0): " << islessgreater(x, y) << "\n";
4545 cout << "islessgreater(10.0, 5.0): " << islessgreater(y, x) << "\n";
4646 cout << "islessgreater(5.0, 5.0): " << islessgreater(x, x) << "\n";
47-
47+
4848 return 0;
4949}
5050```
@@ -73,11 +73,11 @@ int main() {
7373 double d2 = 100.0;
7474 long double ld1 = 1.5L;
7575 long double ld2 = 2.5L;
76-
76+
7777 // NaN comparison
7878 double nan_val = 0.0 / 0.0;
7979 double normal_val = 5.0;
80-
80+
8181 cout << "islessgreater(3.14, 2.71): " << islessgreater(f1, f2) << "\n";
8282 cout << "islessgreater(100.0, 100.0): " << islessgreater(d1, d2) << "\n";
8383 cout << "islessgreater(1.5L, 2.5L): " << islessgreater(ld1, ld2) << "\n";
You can’t perform that action at this time.
0 commit comments