How do you implement complementary "A*(A*A) = A^3" operator overloads (I'm getting strange results)

Daniel Daniel
Mon Aug 19 10:29:10 UTC 2024


On Monday, 19 August 2024 at 09:42:44 UTC, Daniel Donnelly, Jr. 
wrote:
> type_theory.d:
> ```
> module type_theory;
> import std.conv;
> import prod;
>
> [...]

I had to put `while (k > 1)` instead of `while (k > 0)` and it 
works.  I still though can't get it to work with the obvious 
recursive formula of `this * this^(k-1)` for example (same 
issue); any ideas?


More information about the Digitalmars-d-learn mailing list