HACKER Q&A
📣 nathan_f77

Is there any software that can find a formula from inputs and outputs?


I'm attempting to reverse engineer some formulas that control the position and size of some elements (in some PDF software that I want to emulate.) There are four output values: x and y coordinates (to center an element inside a box), and then two size values.

Is there any software where I can enter a list of inputs and outputs, and it can try to figure out the relationships and produce a formula? (I would also appreciate any human help with finding the formulas!)

Here are some example values as CSV:

Width, Height, x, y, size1, size2

18, 18, 2.853, 4.081, 14.532, 13.9943

18, 17.4733, 3.0844, 4.0028, 13.9849, 13.4675

26.9535, 27.4801, 3.164, 5.4875, 24.3802, 23.4781

58.0274, 32.2202, 16.6181, 6.1908, 29.3043, 28.2199

31.1669, 46.9672, 2.0307, 12.6383, 32.0399, 30.8543

59.6075, 55.394, 7.2542, 9.6522, 53.3091, 51.3365

(P.S. I'm not sure if there are some inaccuracies in the data since there was some manual copy/pasting, so 90% accuracy would be fine.)


  👤 verdverm Accepted Answer ✓
Prioritized Grammar Enumeration