Click here to Skip to main content
15,889,876 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello.

Assumed we have four following functions:
- IsGoodForHealthOfMe(bool bCondition)

- IsGoodForHealthOfFamily(bool bCondition)

- IsGoodForHealthOfFriends(bool bCondition)

- IsGoodForHealthOfWorld(bool bCondition)


...and two implementations of the irrationality
for a logical condition bCondition:

Avicenna (980 - 1037), remastered:
bool IsIrrational(bool bCondition)
{
  if (!IsGoodForHealthOfMe(bCondition)      ||
      !IsGoodForHealthOfFamily(bCondition)  ||
      !IsGoodForHealthOfFriends(bCondition) ||
      !IsGoodForHealthOfWorld(bCondition)) {
    return true;
  }
  return false;
}


Hubbard (1911 - 1986), remastered:
bool IsIrrational(bool bCondition)
{
  if (!IsGoodForHealthOfMe(bCondition)) {
    return true;
  }
  if (!IsGoodForHealthOfFamily(bCondition)) {
    return !IsGoodForHealthOfMe(!bCondition);
  }
  if (!IsGoodForHealthOfFriends(bCondition)) {
    return !IsGoodForHealthOfMe(!bCondition) ||
           !IsGoodForHealthOfFamily(!bCondition)
  }
  if (!IsGoodForHealthOfWorld(bCondition)) {
    return !IsGoodForHealthOfMe(!bCondition)     ||
           !IsGoodForHealthOfFamily(!bCondition) ||
           !IsGoodForHealthOfFriends(!bCondition);
  }
  return false;
}


What form (may be a third form)
would be correct for you, please ?

Thank you ! :)
Posted

1 solution

Eugen Podsypalnikov wrote:
What is an irrational result for you ?


π.
:)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900