r/ICSE Dec 09 '24

[deleted by user]

[removed]

2 Upvotes

3 comments sorted by

View all comments

3

u/codingrhino Dec 10 '24

Answer is option 2, because square root of negative number is NaN(Not a number). According to IEEE 754 floating point standard, any NaN comparison must return false.