]> https://gitweb.dealii.org/ - dealii.git/commitdiff
simplify an expression 4217/head
authorMatthias Maier <tamiko@43-1.org>
Fri, 7 Apr 2017 13:35:58 +0000 (08:35 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 7 Apr 2017 13:35:58 +0000 (08:35 -0500)
include/deal.II/lac/eigen.h

index b0e1f3d3b41196b6abbae3223a91cba4567ed8ed..46612c6fea59e565f69ff077860cd475ab6d6b8d 100644 (file)
@@ -385,9 +385,7 @@ EigenInverse<VectorType>::solve (double           &value,
       --i;
 
       // Compute unshifted eigenvalue
-      value = (entry * x (i) < 0.) ? -length : length;
-      value = 1./value;
-      value -= current_shift;
+      value = (entry * x(i) < 0. ? -1. : 1.) / length - current_shift;
 
       if (iter==goal)
         {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.