Exact arithmetic with quadratic irrationals

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 20 12:18:11 PDT 2017


On 20.04.2017 21:11, Timon Gehr wrote:
>> Update: QRat now supports ^^. :-) Integral exponents only, of course.  I
>> also implemented negative exponents, because QRat supports division and
>> the same algorithm can be easily reused for that purpose.
>> ...
>
> Nice! :)

It does not work with BigInt-based QRats (T(1) does not work, as 1 does 
not implicitly convert to BigInt.)


More information about the Digitalmars-d mailing list