So I discovered a strange bug in the exp function when it is given a tensor with a non-zero unit element. I suspect the problem is in an optimisation of the multiplication logic but I will have to check. This only effects dense vectors, and presumably hybrid vectors when the dense part is sufficiently large.
dense_tensor_functions_float:26:1: error: Failure in tensor_exp_two_letters_plus_unit: Expected 0 +/- 3e-08 but was 5.10864
dense_tensor_functions_double:26:1: error: Failure in tensor_exp_two_letters_plus_unit: Expected 0 +/- 2e-15 but was 5.10864
dense_tensor_functions_rational:16:1: error: Failure in tensor_exp_two_letters_plus_unit: Expected ...
So I discovered a strange bug in the exp function when it is given a tensor with a non-zero unit element. I suspect the problem is in an optimisation of the multiplication logic but I will have to check. This only effects dense vectors, and presumably hybrid vectors when the dense part is sufficiently large.