Skip to content
Snippets Groups Projects
Commit c262f47a authored by Markus Blatt's avatar Markus Blatt
Browse files

Prevent division by zero which produces a SIGFPE on some systems.

[[Imported from SVN: r6285]]
parent 2a61a0e4
No related branches found
No related tags found
No related merge requests found
......@@ -114,21 +114,25 @@ struct ScalarOperatorTest
a = v + a;
a = v - a;
a = v * a;
a += (ft)1; // make sure a!=0
a = v / a;
v = v + a;
v = v - a;
v = v * a;
a += (ft)1; // make sure a!=0
v = v / a;
a = a + v;
a = a - v;
a = a * v;
v += (ft)1; // make sure v!=0
a = a / v;
v = a + v;
v = a - v;
v = a * v;
v += (ft)1; // make sure v!=0
v = a / v;
v -= v;
......@@ -136,6 +140,7 @@ struct ScalarOperatorTest
v += v;
v += a;
v *= a;
a += (ft)1; // make sure a!=0
v /= a;
b = (v == a);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment