gussmith23 / posit-bisection-viz

10 stars 3 forks source link

Alert when trying to select invalid posit #10

Closed dpetrisko closed 5 years ago

dpetrisko commented 5 years ago

Maybe a little toast when you try to put n or es into an invalid range

mara-kr commented 5 years ago

Or, we could have the sliders auto-correct to a good value when moving out of a valid range.

dpetrisko commented 5 years ago

They already do that

dpetrisko commented 5 years ago

The idea is to alert the user why the selection is invalid

gussmith23 commented 5 years ago

As I described in the chat, I don't think there are actually invalid combinations! es doesn't actually depend on n. Any non-negative value of es is meaningful and can be decoded correctly. Obviously, n doesn't depend on anything either. So essentially, if we just set upper and lower bounds on n and es, we should be good. I think 2<=n<=8 or 10 is ok, and then es should be 0 <= es <= 8 or 10 (it can really be anything though).

mara-kr commented 5 years ago

Fixed -- 2 <= n <= 8; 0 <= es <= 10. The sliders don't have an "out of range", so there's no need for a warning. b3f1efc