You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Furthermore, we might consider create a global buffer to store commonly used math constants (specifically pi, ln2 and ln10). This requires one of the following modifications:
the context stores an Rc to the constants. In that case, the Context will be !Send and !Sync and we need to inform users that only Repr is Send and Sync.
adding a global buffer (per thread / cross thread). This should be gated by a feature option, and we should provide a function (maybe associated with the Context type) to clear the buffer.
The text was updated successfully, but these errors were encountered:
After some investigation, it's hard to ensure that the buffer for constant is passed around easily without duplication. So I guess the implementation should rely on a thread local static buffer with RefCell. Then the implementation won't result in a break change and can be postponed to v0.5
Support the following math constants under the
dashu_float::consts
module:e(precision: usize) -> FBig<B, R>
pi(precision: usize) -> FBig<B, R>
ln2(precision: usize) -> FBig<B, R>
ln10(precision: usize) -> FBig<B, R>
sqrt2(precision: usize) -> FBig<B, R>
(ref)Furthermore, we might consider create a global buffer to store commonly used math constants (specifically
pi
,ln2
andln10
). This requires one of the following modifications:Rc
to the constants. In that case, theContext
will be!Send
and!Sync
and we need to inform users that onlyRepr
isSend
andSync
.Context
type) to clear the buffer.The text was updated successfully, but these errors were encountered: