Can the following set of transformations:

-(a - b) -> b - a

x - x -> 0.0

-(a + b) -> (-a) - b

-(a + b) -> (-b) - a

x / C -> x * (1.0 / C)

(a * c) + (b * c) -> (a + b) * c

(a + b) * c -> (a * c) + (b * c)

a * (b / c) -> (a * b) / c

a * (b * c) -> (a * b) * c

a + (b + c) -> (a + b) + c

x + C1 == C2 -> x == C2 - C1

x + C1 != C2 -> x != C2 - C1

change a well conditioned and stable algorithm/code into an unstable algorithm? One can apply these transformations locally, on the order of ~10 times or so (i.e., not more than a 1000 times).

As a simple example, if these rules could be applied more than ~10 times, is a change from n*dx into dx+dx+dx+…, which for very large integer “n” becomes unstable due to numerical round off error.

It seems to me, however, that these transformation if applied only ~10 times cannot make a stable and well conditioned code unstable. If somebody has a counter example, I would be interested. In this thread, please lets only discuss this particular problem/challenge and nothing else. So that we can reach a simple conclusion of either “yes” or “no”.