Joe1000
New member
- Joined
- Nov 22, 2022
- Messages
- 3
- Programming Experience
- 10+
I'm looking for libraries with which I can track floating-point error. That is, evaluate floating-point expressions, and get back not just their value, but also an indication of its error.
My reading shows that this is generically called self-validation ( see intro to https://tema.sbmac.org.br/tema/article/download/352/291 ) and that techniques include interval arithmetic ( JuliaIntervals ), affine arithmetic ( GitHub - JuliaIntervals/AffineArithmetic.jl: Affine arithmetic in Julia ), and stochastic arithmetic ( GitHub - ffevotte/StochasticArithmetic.jl: Stochastic Arithmetic to diagnose Floating-Point problems in Julia ). Using these, the programmer calculates with types that look as though they're floats — you can use operators + - * / ^ as usual — but that evaluate to a pair containing both the value and the error.
Those three links are to Julia code write-ups, which demonstrate the ideas nicely. Sadly, I've found almost nothing for C#, and I now wonder: do C# developers care at all about how accurate their results are? Shouldn't Microsoft publish such libraries? After all, they presumably need them to validate their own code. One library I did find was Marcel Neumann’s IntSharp at GitHub - selmaohneh/IntSharp: A rigorous interval arithmetic library for .NET , but I don't know whether he's still maintaining it.
Any info would be very welcome.
My reading shows that this is generically called self-validation ( see intro to https://tema.sbmac.org.br/tema/article/download/352/291 ) and that techniques include interval arithmetic ( JuliaIntervals ), affine arithmetic ( GitHub - JuliaIntervals/AffineArithmetic.jl: Affine arithmetic in Julia ), and stochastic arithmetic ( GitHub - ffevotte/StochasticArithmetic.jl: Stochastic Arithmetic to diagnose Floating-Point problems in Julia ). Using these, the programmer calculates with types that look as though they're floats — you can use operators + - * / ^ as usual — but that evaluate to a pair containing both the value and the error.
Those three links are to Julia code write-ups, which demonstrate the ideas nicely. Sadly, I've found almost nothing for C#, and I now wonder: do C# developers care at all about how accurate their results are? Shouldn't Microsoft publish such libraries? After all, they presumably need them to validate their own code. One library I did find was Marcel Neumann’s IntSharp at GitHub - selmaohneh/IntSharp: A rigorous interval arithmetic library for .NET , but I don't know whether he's still maintaining it.
Any info would be very welcome.