## digitalmars.D.learn - BigFloat?

- Vlad Levenfeld (2/2) Feb 16 2015 We've got arbitrary precision integers, why not arbitrary
- Kagamin (1/1) Feb 17 2015 Periodic fractions.
- Vlad Levenfeld (6/7) Feb 17 2015 Or transcendental numbers, for that matter, but arbitrary !=
- Dominikus Dittes Scherkl (5/13) Feb 17 2015 We have rational (two bigint, one for the numerator and one for
- Vlad Levenfeld (4/7) Feb 17 2015 Yeah, this is probably the best that can be done, since any
- Kagamin (4/7) Feb 17 2015 What do you mean? As long as you don't change the operand, it
- Vlad Levenfeld (6/13) Feb 17 2015 If you add or subtract two floating point numbers whose

We've got arbitrary precision integers, why not arbitrary precision floating point?

Feb 16 2015

On Tuesday, 17 February 2015 at 08:05:49 UTC, Kagamin wrote:Periodic fractions.Or transcendental numbers, for that matter, but arbitrary != infinite. A max_expansion template parameter could be useful here. For my use case I'm less concerned with absolute resolution than with preserving the information in the smaller operand when dealing with large magnitude differences.

Feb 17 2015

On Tuesday, 17 February 2015 at 09:08:17 UTC, Vlad Levenfeld wrote:On Tuesday, 17 February 2015 at 08:05:49 UTC, Kagamin wrote:We have rational (two bigint, one for the numerator and one for the denominator), which I like better than floatingpoint (it's more expressive).Periodic fractions.Or transcendental numbers, for that matter, but arbitrary != infinite. A max_expansion template parameter could be useful here. For my use case I'm less concerned with absolute resolution than with preserving the information in the smaller operand when dealing with large magnitude differences.

Feb 17 2015

On Tuesday, 17 February 2015 at 13:55:15 UTC, Dominikus Dittes Scherkl wrote:We have rational (two bigint, one for the numerator and one for the denominator), which I like better than floatingpoint (it's more expressive).Yeah, this is probably the best that can be done, since any arbitrary-precision float is just gonna be a subset of Q anyway.

Feb 17 2015

On Tuesday, 17 February 2015 at 09:08:17 UTC, Vlad Levenfeld wrote:For my use case I'm less concerned with absolute resolution than with preserving the information in the smaller operand when dealing with large magnitude differences.What do you mean? As long as you don't change the operand, it will preserve its value.

Feb 17 2015

On Tuesday, 17 February 2015 at 14:03:45 UTC, Kagamin wrote:On Tuesday, 17 February 2015 at 09:08:17 UTC, Vlad Levenfeld wrote:If you add or subtract two floating point numbers whose magnitudes differ, then the lower bits of the smaller operand will be lost in the result. If the magnitudes are different enough, then the result of the operation could even be equal to the larger operand. In vivo: http://dpaste.dzfl.pl/870c5e61d276For my use case I'm less concerned with absolute resolution than with preserving the information in the smaller operand when dealing with large magnitude differences.What do you mean? As long as you don't change the operand, it will preserve its value.

Feb 17 2015