     std::cout << " Error norm of  1d integral function "<<norm<<"\n";
     // TEST if dot throws on NaN
     dg::blas1::transform( x,x, dg::LN<double>());
-    dg::blas1::dot( x,x);
+    try{
+        dg::blas1::dot( x,x);
+    }catch ( std::exception& e)
+    {
+        std::cerr << "Error thrown as expected\n";
+        std::cerr << e.what() << std::endl;
+    }
 
     std::cout << "\nFINISHED! Continue with topology/derivatives_t.cu !\n\n";
     return 0;

}
};

double function( double x, double y)
{
        return exp(x)*exp(y);
}
double function( double x, double y, double z)
{
        return exp(x)*exp(y)*exp(z);
}

typedef thrust::device_vector< double>   DVec;
typedef thrust::host_vector< double>     HVec;

int main()
{

    std::cout << "Relative 3d error is      "<<(norm3d-solution3d)/solution3d<<"\n\n";

    std::cout << "TEST result of a sin and exp function to compare compiler specific math libraries:\n";
    dg::DVec x(1, 6.12610567450009658);
    dg::blas1::transform( x, x, sin_function() );
    res.d = x[0];
    std::cout << "Result of sin:    "<<res.i<<"\n"
              << "          GCC:    -4628567870976535683 (correct)"<<std::endl;
    dg::DVec y(1, 5.9126151457310376);
    dg::blas1::transform( y, y, exp_function() );
    res.d = y[0];
    std::cout << "Result of exp:     "<<res.i<<"\n"
