/* Fahrenheint -> Celsius C = 5 * ((F - 32) / 9) or C = (5 * F) / 9 - 160/9 or C = -17.77777778 + 0.5555555556 F F = (9 * C) / 5 + 32 or 1.8*C + 32.0 Too hard using 0..100. Using Constants [5,9,32], it finds this quickly maxCount = 5 code = (5 * ((F - 32) / 9)) = [[[96],35.555555560000002],[[81],27.222222219999999],[[-15],-26.11111111],[[145],62.777777780000001],[[-30],-34.444444439999998],[[12],-11.11111111],[[31],-0.55555556],[[33],0.55555556],[[-48],-44.444444439999998],[[-7],-21.666666670000001]] = [[0.0] = -17.777777777777779] Shaving the constants to just even numbers: Using 2..2..50 (approx 0.1) code = (10 * ((F - 32) / 18)) = [[[96],35.555555560000002],[[81],27.222222219999999],[[-15],-26.11111111],[[145],62.777777780000001],[[-30],-34.444444439999998],[[12],-11.11111111],[[31],-0.55555556],[[33],0.55555556],[[-48],-44.444444439999998],[[-7],-21.666666670000001]] = [[0.0] = -17.777777777777779] Cf fahrenheit_celsium.conf */ data(fahrenheit_celsius,Data,Vars,Unknown,Ops,Constants,MaxC) :- Data = [ [[96],35.55555556], [[81], 27.22222222], [[-15], -26.11111111], [[145], 62.77777778], [[-30], -34.44444444], [[12], -11.11111111], [[31], -0.55555556], [[33], 0.55555556], [[-48], -44.44444444], [[-7], -21.66666667] ], get_global_map().put("use_approx",0.1), % get_global_map().put("debug",true), Unknown = [0.0], Vars = ["F"], Ops = new_map([infix=["+","-","*","/"]]), % Constants = [5,9,32], % cheating % Constants = 1..100, % Too hard Constants = 2..2..50, MaxC = 5.