diff --git a/src/ExprNode.cc b/src/ExprNode.cc
index c2a35b0439dd39f2fecd3111e968ba742d020c5e..ffa4166d5ad84d42e932c77e43bd7c533d8d7602 100644
--- a/src/ExprNode.cc
+++ b/src/ExprNode.cc
@@ -4475,15 +4475,25 @@ BinaryOpNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
     case BinaryOpcode::times:
       if (isLatexOutput(output_type))
         output << R"(\, )";
+      else if (output_type == ExprNodeOutputType::occbinDifferenceFile)
+        output << ".*"; // This file operates on vectors, see dynare#1826
       else
         output << "*";
       break;
     case BinaryOpcode::divide:
       if (!isLatexOutput(output_type))
-        output << "/";
+        {
+          if (output_type == ExprNodeOutputType::occbinDifferenceFile)
+            output << "./"; // This file operates on vectors, see dynare#1826
+          else
+            output << "/";
+        }
       break;
     case BinaryOpcode::power:
-      output << "^";
+      if (output_type == ExprNodeOutputType::occbinDifferenceFile)
+        output << ".^"; // This file operates on vectors, see dynare#1826
+      else
+        output << "^";
       break;
     case BinaryOpcode::less:
       output << "<";