CUET PG 2025 — Computer PYQ
CUET PG | Computer | 2025What is the result of the following operation defined by IEEE754. (NaN = = Nan)
Choose the correct answer:
- A.
false
(Correct Answer) - B.
true
- C.
error
- D.
1
false
Explanation
IEEE 754 standard mein NaN ke liye comparison rules niche diye gaye hain:
-
Self-Comparison: Koi bhi variable x agar NaN hai, toh wo apne aap ke barabar nahi hota:
If x=NaN, then (x==x) is False -
Inequality: NaN hamesha apne aap se "Not Equal" hota hai:
(NaN=NaN)→True -
Ordering: NaN ka kisi bhi number ke saath comparison (<, >, \leq, \geq) hamesha False hota hai:
(NaN < 5) \rightarrow \text{False}(NaN > 5) \rightarrow \text{False}
Explanation
IEEE 754 standard mein NaN ke liye comparison rules niche diye gaye hain:
-
Self-Comparison: Koi bhi variable x agar NaN hai, toh wo apne aap ke barabar nahi hota:
If x=NaN, then (x==x) is False -
Inequality: NaN hamesha apne aap se "Not Equal" hota hai:
(NaN=NaN)→True -
Ordering: NaN ka kisi bhi number ke saath comparison (<, >, \leq, \geq) hamesha False hota hai:
(NaN < 5) \rightarrow \text{False}(NaN > 5) \rightarrow \text{False}

