Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't mutate globals when constructing Rational from AbstractIrrational
Relying on `ScopedValues`, set `BigFloat` precision without mutating the global default, while constructing `Rational` from `AbstractIrrational`. Also helps avoid reading the global defaults for the precision and rounding mode, together with JuliaLang#56095. What does this fix: * in the case of the `Irrational` constants defined in `MathConstants`: relevant methods have `@assume_effects :foldable` applied, which includes `:effect_free`, which requires that no globals be mutated (followup on JuliaLang#55886) * in the case of `AbstractIrrational` values in general, this PR prevents data races on the global `BigFloat` precision
- Loading branch information