bigint and pow

2022-10-01 Thread Fausto via Digitalmars-d-learn
Hello, I am trying to use pow with an integer argument, but I cannot have a bigint result, for example, ```pow(10,72)```. Do I have to write my pow function or is there a native solution? thanks, Fausto

Re: bigint and pow

2022-10-01 Thread rassoc via Digitalmars-d-learn
On 10/2/22 00:04, Fausto via Digitalmars-d-learn wrote: Hello, I am trying to use pow with an integer argument, but I cannot have a bigint result, for example, ```pow(10,72)```. Do I have to write my pow function or is there a native solution? thanks, Fausto In contrast to certain scripting

Re: bigint and pow

2022-10-02 Thread Fausto via Digitalmars-d-learn
On Sunday, 2 October 2022 at 02:02:37 UTC, rassoc wrote: On 10/2/22 00:04, Fausto via Digitalmars-d-learn wrote: Hello, I am trying to use pow with an integer argument, but I cannot have a bigint result, for example, ```pow(10,72)```. Do I have to write my pow function or is there a native so

Re: bigint and pow

2022-10-02 Thread rassoc via Digitalmars-d-learn
On 10/2/22 09:24, Fausto via Digitalmars-d-learn wrote: Thanks a lot. I am to used to C and, more important, I didn't think to look for also another operator for the power function :) D does have pow and many other useful math functions [1], it's just not defined for BitInts. Oh, and speakin

Re: bigint and pow

2022-10-02 Thread rassoc via Digitalmars-d-learn
On 10/2/22 09:24, Fausto via Digitalmars-d-learn wrote: Thanks a lot. I am to used to C and, more important, I didn't think to look for also another operator for the power function :) Oh, and I forgot to mention that this is doing what you probably asked for originally: ```d import std; imp