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 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.
Support the following math constants under the
dashu_float::constsmodule: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,ln2andln10). This requires one of the following modifications:Rcto the constants. In that case, theContextwill be!Sendand!Syncand we need to inform users that onlyReprisSendandSync.Contexttype) to clear the buffer.