Is there a way to introduce logical tests into equations? For example, C has a very useful operator "?:" which returns values like so:(adsbygoogle = window.adsbygoogle || []).push({});

x = (x < 1) ? 1 : x;

which could be used in equations like this to multiply by 1 for any value less than 1.

[tex]Q(x) = \prod_{j=-5}^x ((j < 1) ? 1 : j) [/tex]

Just wondering...

Ken

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Logical tests in equations?

Loading...

Similar Threads - Logical tests equations | Date |
---|---|

I Induction axiom | Feb 1, 2018 |

B What is the converse statement of the given sentence? | Dec 13, 2017 |

B Logical process of solving equations | Feb 1, 2017 |

I Check my logic | Jan 22, 2017 |

What should I know to test out of Intro to Logic and Proof? | May 1, 2011 |

**Physics Forums - The Fusion of Science and Community**