| ▲ | slwvx an hour ago | ||||||||||||||||||||||
Yes, the idea of a turn [1] is interesting. And maybe useful. I have a different question: What would it take for a compiler to remove (elide) the multiply by pi + divide by pi that the author uses as an example? I guess one would not have to go as far as a Lean proof that two bits of code produce the same result? | |||||||||||||||||||||||
| ▲ | eru an hour ago | parent [-] | ||||||||||||||||||||||
Well, they don't produce the same result in floating point math, I'm afraid. So you'd need to teach your compiler about what your formulas mean and what context you are using them in. (Ie are you actually doing geometry, or is your AI coding agent just trying arbitrary activation functions for your neuronal net experiments and some of them happen to look like geometry?) | |||||||||||||||||||||||
| |||||||||||||||||||||||