Question
Is !(a < b) logically the same as a >= b?

Answers

No!

Despite what your grade school math teacher taught you, these equivalences don't always work in software, especially with floating point expressions or user-defined types.

Example: if a is a floating point NaN, then both a < b and a >= b will be false. That means !(a < b) will be true and a >= b will be false.

Example: if a is an object of class Foo that has overloaded operator< and operator>=, then it is up to the creator of class Foo if these operators will have opposite semantics. They probably should have opposite semantics, but that's up to whoever wrote class Foo.   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q Tell us top 5 breaking news of the year 2015?
  • Q How many ways are there for initiating a transaction ? what are they?
  • Q In assembler relocatable code generated by ...!!??
  • Q Write briefly on PTH
  • Q A person who helps even a stranger in difficulty
  • Q Difference between ‘>>’ and ‘>>>’ operators in java?
  • Q Write a java program to check whether two strings are anagrams or not using sorting method?
  • Q Who is the Director-General of International Labour Organization (ILO)?
  • Q what type of bones are bones of ankle?
  • Q Tell me about a time that you dealt with an angry customer or client. What would you have done differently?
  • Q Fear of snakes