translations are explicitly reusing the exact literal content, and theres explicitly carve outs in modern law around translated works
math and food recipes are explicitly not protected by copyright law.
i hope that helps clarify?
> building dimilar code for a similar task in a
> different language is definitely not infringing unless its also copying all
> the text from the source application like some sort of text rpg.
What if we compare this to literature? Surely a translation of a book into
another language is still considered a derivative work, even if it reuses none
of the “literal text”.