With DMD 2.048 this dotProduct doesn't work: import std.numeric; void main() { assert(dotProduct([1, 3, -5], [4, -2, -1]) == 3); } This is the first part of dotProduct: Unqual!(CommonType!(F1, F2)) dotProduct(F1, F2)(in F1[] avector, in F2[] bvector) { immutable n = avector.length; assert(n == bvector.length); auto avec = avector.ptr, bvec = bvector.ptr; typeof(return) sum0 = 0.0, sum1 = 0.0; To fix it replace this: typeof(return) sum0 = 0.0, sum1 = 0.0; With: typeof(return) sum0 = 0, sum1 = 0;
http://dsource.org/projects/phobos/changeset/1953