Re: BigFloat?

2017-04-10 Thread Russel Winder via Digitalmars-d-learn
On Mon, 2017-04-10 at 12:17 -0700, H. S. Teoh via Digitalmars-d-learn wrote: > […] > > There is no BigFloat in phobos, you could try looking at > code.dlang.org > to see if there's anything that you could use. > […] Isn't the way forward here just to wrap GMP: htt

Re: BigFloat?

2017-04-10 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Apr 10, 2017 at 06:54:54PM +, Geroge Little via Digitalmars-d-learn wrote: > Is there support for BigFloat in phobos or any other package? I was > playing around with D and wrote some code that calculates a Fibonacci > sequence (iterative) with overflow detection that upgra

BigFloat?

2017-04-10 Thread Geroge Little via Digitalmars-d-learn
Is there support for BigFloat in phobos or any other package? I was playing around with D and wrote some code that calculates a Fibonacci sequence (iterative) with overflow detection that upgrades ulong to BigInt. I also wanted to use Binet's formula which requires sqrt(5) but it only wor

Re: BigFloat?

2015-02-17 Thread Vlad Levenfeld via Digitalmars-d-learn
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-

Re: BigFloat?

2015-02-17 Thread Vlad Levenfeld via Digitalmars-d-learn
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: 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.

Re: BigFloat?

2015-02-17 Thread Kagamin via Digitalmars-d-learn
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,

Re: BigFloat?

2015-02-17 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
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: Periodic fractions. Or transcendental numbers, for that matter, but arbitrary != infinite. A max_expansion template parameter could be useful here. For my use ca

Re: BigFloat?

2015-02-17 Thread Vlad Levenfeld via Digitalmars-d-learn
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 t

Re: BigFloat?

2015-02-17 Thread Kagamin via Digitalmars-d-learn
Periodic fractions.

BigFloat?

2015-02-16 Thread Vlad Levenfeld via Digitalmars-d-learn
We've got arbitrary precision integers, why not arbitrary precision floating point?