C++程序  |  3行  |  64 B

ArrayXd v = ArrayXd::LinSpaced(5,0,1);
cout << tanh(v) << endl;