Problem: subraction giving very strange results

Also float arrays will consume a lot of memory. Maybe you are already out of memory.