LaTeX rendering of nice numbers isn't always nice
Useful internal functions to render some rational, algebraic numbers and exponential form of complex number aren't always producing the best result when used outside state rendering (standalone number rendering rather than coefficients). Now that we want to add a few other use cases we may want to fix that.
UPDATE:
Standalone rendering is now supported. The remaining part is only about improvements.
Previously:
After #1885, these numbers will rarely (never?) show up in output, so we are marking this as low priority.
Code changes in https://github.com/microsoft/qsharp/pull/1885 provide correct handling of standalone numbers (rather than coefficients). The following can still be improved in general case: * i could be used directly in a fraction. Example: $\frac{1}{2}i$ could be rendered as $\frac{i}{2}$. * In a simple fraction sign can be moved to numerator: Example: $-\frac{i}{2}$ could be rendered as $\frac{-i}{2}$. * Brackets are not needed for standalone rendering. Example: $-\left(1+i\right)$ could be rendered as $-1-i$ * No need to rationalize the denominator. Example: $\frac{\sqrt{2}}{2}$ could be rendered as $\frac{1}{\sqrt{2}}$