How to tell VS Code to use the fast math option?

You really don’t want to use --math-mode=fast. You’re telling the compiler to do something that’s fundamentally broken, e.g. sinpi and cospi return incorrect results when using `--math-mode=fast` · Issue #30073 · JuliaLang/julia · GitHub. The global flag is much worse than the occasional use of the @fastmath macro, which is far less broken, but still may cause incorrect results. You shouldn’t use --math-mode=fast unless you’re willing to take the risk that all of your results might be wrong.

5 Likes