@Test
public void testCrossProduct() {
// we compare accurate versus naive cross product implementations
// on regular vectors (i.e. not extreme cases like in the previous test)
Well1024a random = new Well1024a(885362227452043214l);
for (int i = 0; i < 10000; ++i) {
double ux = random.nextDouble();
double uy = random.nextDouble();
double uz = random.nextDouble();
double vx = random.nextDouble();
double vy = random.nextDouble();
double vz = random.nextDouble();
Vector3D cNaive = new Vector3D(uy * vz - uz * vy, uz * vx - ux * vz, ux * vy - uy * vx);
FieldVector3D<DerivativeStructure> uds = createVector(ux, uy, uz, 3);
FieldVector3D<DerivativeStructure> vds = createVector(vx, vy, vz, 3);
Vector3D v = new Vector3D(vx, vy, vz);