Self-check expression with rational exponents? Why doesn't this work?

I am trying to incorporate self-checking into this activity to review writing rational and radical expression with exponents. Was pretty proud of myself for figuring out how to do it - works great on screens 2&3 where the exponents are integers.

But then on screen 4, it does not seem to be able to handle the power 5/3?? Although I have verified that it handles x^(1/3) and x^5 just fine, but not x^(5/3). Am I missing something here? Is there a fix? Do I have a dumb math mistake in my checks that I’ve stared at for an hour and am just not seeing??? :face_with_raised_eyebrow:

UPDATE: I guess this has something to do with the fact that exponent is a repeating decimal and there is some kind of wonky rounding thing going on?? I played around with it, and noticed that the check worked fine for a power of 1/2, 3/2, etc, so I changed the CL to this and now it works:

I’m still puzzled though, as it also worked with a power of 1/3…? :thinking: But, at least I know (sorta) what the problem was and how to patch it up. Still interested in insight and/or any more elegant fixes though.

Maybe because 5/3 rounds up, and 1/3 rounds down. If 2/3 doesn’t work, that might be it.

I thought maybe that was it - tried 2/3 and indeed it did NOT work! But…

1/6 (=0.166667…), checked with f.evaluateAt(64)=2 DOES work
5/6 (=0.83333…), checked with f.evaluateAt(64)=32 does NOT work
4/3 (=1.3333…), checked with f.evaluateAt(8)=16 does NOT work
1/7 (=0.1428571…), checked with f.evaluateAt(128)=2 DOES work

I tried that last one to test a non-repeating, non-terminating decimal. So I’m concluding it has to do with a combination of the power being a non-terminating decimal, AND the numerator being >1?? It seems to work if EITHER of those conditions are absent. :thinking:

I also tried changing up the checking process to use a hidden graph, and basically had the same issue. I have to sum up the checking values and use a test of sum<0.00001 rather than sum=0, in those same cases.