# Self-Checking Math Input for Undefined Values

**URL:** <https://cl.desmos.com/t/self-checking-math-input-for-undefined-values/5362>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [February 16, 2024, 7:57pm UTC](https://cl.desmos.com/t/self-checking-math-input-for-undefined-values/5362 "2024-02-16T19:57:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![K\_P](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/k_p/32/4809_2.png) [@K\_P](https://cl.desmos.com/u/K_P)\
**Post date:** [February 16, 2024, 7:57pm UTC](https://cl.desmos.com/t/self-checking-math-input-for-undefined-values/5362/1 "2024-02-16T19:57:06Z")

</div>

I am using the following CL code to allow students to self-check contents of a table (example)

cellContent(1,3): when table7.cellContent(1,2)= “”  
“”  
when table7.cellNumericValue(1,2)=7.2  
“✅”  
otherwise “❌”

This works for finite answers, and when I enter in a range of values (for repeating decimals). The issue I am running into is if, for example, the correct answer is “1/0”, which is undefined. Does anyone know how I would write “undefined” in the validation statement?

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [February 16, 2024, 8:24pm UTC](https://cl.desmos.com/t/self-checking-math-input-for-undefined-values/5362/2 "2024-02-16T20:24:56Z")

</div>

This would check if a cell has a fraction with a denominator of 0.

```auto
p = patterns
zeroDen = p.fraction(p.number,p.number.satisfies(`x=0`) )
check11 = zeroDen.matches(this.cellContent(1,1))

```
