(* Polynomial Examples *)
let schwefel_poly = expr_to_vector_fun `(x1 - x2 pow 2) pow 2 + (x2 - &1) pow 2 + 
  (x1 - x3 pow 2) pow 2 + (x3 - &1) pow 2`;;
let rd_poly = expr_to_vector_fun `-- x1 + &2 * x2 - x3 - #0.835634534 * x2 * (&1 + x2)`;;
let caprasse_poly = expr_to_vector_fun `-- x1 * x3 pow 3 + &4 * x2 * x3 pow 2 * x4 + 
  &4 * x1 * x3 * x4 pow 2 + &2 * x2 * x4 pow 3 + &4 * x1 * x3 + &4 * x3 pow 2 - 
  &10 * x2 * x4 - &10 * x4 pow 2 + &2`;;
let lv_poly = expr_to_vector_fun `x1 * x2 pow 2 + x1 * x3 pow 2 + x1 * x4 pow 2 - #1.1 * x1 + &1`;;
let butcher_poly = expr_to_vector_fun `x6 * x2 pow 2 + x5 * x3 pow 2 - x1 * x4 pow 2 + x4 pow 2 -
  &1 / &3 * x1 + &4 / &3 * x4`;;
let magnetism_poly = expr_to_vector_fun `x1 pow 2 + &2 * x2 pow 2 + &2 * x3 pow 2 + &2 * x4 pow 2 +
  &2 * x5 pow 2 + &2 * x6 pow 2 + &2 * x7 pow 2 - x1`;;
let heart_poly = expr_to_vector_fun `-- x1 * x6 pow 3 + &3 * x1 * x6 * x7 pow 2 - x3 * x7 pow 3 +
  &3 * x3 * x7 * x6 pow 2 - x2 * x5 pow 3 + &3 * x2 * x5 * x8 pow 2 - x4 * x8 pow 3 + 
  &3 * x4 * x8 * x5 pow 2 - #0.9563453`;;

let schwefel_min = `-- #0.00000000058806` and
    rd_min = `-- #36.7126907` and
    caprasse_min = `-- #3.1801` and
    lv_min = `-- #20.801` and
    butcher_min = `-- #1.44` and
    magnetism_min = `-- #0.25001` and
    heart_min = `-- #1.7435`;;

let schwefel_dom = `[-- &10; -- &10; -- &10]`, `[&10; &10; &10]`;;
let rd_dom = `[-- &5; -- &5; -- &5]`, `[&5; &5; &5]`;;
let caprasse_dom = `[-- #0.5; -- #0.5; -- #0.5; -- #0.5]`, `[#0.5; #0.5; #0.5; #0.5]`;;
let lv_dom = `[-- &2; -- &2; -- &2; -- &2]`, `[&2; &2; &2; &2]`;;
let butcher_dom = `[-- &1; -- #0.1; -- #0.1; -- &1; -- #0.1; -- #0.1]`,
  `[&0; #0.9; #0.5; -- #0.1; -- #0.05; -- #0.03]`;;
let magnetism_dom = `[-- &1; -- &1; -- &1; -- &1; -- &1; -- &1; -- &1]`,
  `[&1; &1; &1; &1; &1; &1; &1]`;;
let heart_dom = `[-- #0.1; #0.4; -- #0.7; -- #0.7; #0.1; -- #0.1; -- #0.3; -- #1.1]`,
  `[#0.4; &1; -- #0.4; #0.4; #0.2; #0.2; #1.1; -- #0.3]`;;