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
I want to use your BigNum Package to compute fractals with arbitrary Precision! However, I realised that the algorithm gets choked to death by every increasing precision floating point numbers (I use BigFloat). Is there a way to limit the precision of BigFloats. And more importantly to limit the precision of products or sums of big floats (e.g. to 100 digits?)?
I thought about something like:
vartemp=BigFloat.init(maxPrecision:100)
Such that temp will get a limit, and thereby the CPU has a chance to perform….
The text was updated successfully, but these errors were encountered:
And each math function can manually set the precision of the result.
// 2.718281828459045235360287471352662497759 regardless of BigFloat.precision
BigFloat.exp(1, precision:128)
The problem is this applies only to math functions. For arithmetic operations +, - and *, precisions are not truncated because you can always yield exact results.
You can manually reduce precision via .truncate(width:) or .truncated(width:).truncate(width:) mutates the current BigFloat object while ``.truncated(width:)` creates a new one.
The operation / already has a divide(by:precision:round:) and divided(by:precision:round:) which manually sets precision (with the rounding rule specified in round:). I should add .add{,ed}(), subtract{,ed}().multipl{y,ed}(), that corresponds to the division…
From a mail I received
The text was updated successfully, but these errors were encountered: