Work around issues with emscripten memory allocation
o Allocate 3 separate 'double' arrays, instead of indexing into
  one array; _free fails.