Numbers icon indicating copy to clipboard operation
Numbers copied to clipboard

Fixed-point equations

Open depler opened this issue 2 years ago • 0 comments

How to implement arbitrary precision arithmetic with fixed point? Let's say we have this code:

var ctx = EContext.ForPrecision(5);
var a = EDecimal.FromString("2");
var b = a.Sqrt(ctx);

That means 5 total digits (both integer and fractional part), so it produces result 1.4142 which is not what I need. I want to call something like EContext.ForFixedPrecision(5) and always get results with 5 digits after point (while integer part remains unlimited). Is it possible?

depler avatar Sep 27 '21 14:09 depler