Well, it depends on what inaccuracy you are referring to. If you are looking for a function where the output must be updated at the same simulation time step, a DLL is not something you should consider (use a B-source instead).
A DLL block includes the Trunc() function. You can define a state change to dramatically reduce the time step at critical moments, such as a gate toggle. This allows the time step to temporarily decrease during transitions and return to a larger step afterward, balancing precision and total simulation time. This is also why Qspice can be so effective.
@physicboy, @RDunn, and I have had multiple discussions on this topic in this forum. @physicboy and I have different preferences regarding how to handle time step reduction. There is no right or wrong way to do things; it all depends on what you want to achieve. The best way to understand this topic is to build a simulation with your own DLL and post your work if you encounter challenges.
I have a SVPWM project implemented with both a B-source and a DLL, and they yield identical results. So, don’t worry too much, but of course, have to gain enough experience to master how to manage time steps in a DLL.
QSPICE Schematic Capture “Space-Vector Pulse Width Modulation” - QSPICE - Qorvo Tech Forum