Custom Exponents
Malkierian
rhydonj at gmail.com
Sat Dec 14 21:47:09 PST 2013
On Sunday, 15 December 2013 at 05:39:03 UTC, Nathan M. Swan wrote:
> On 12/14/13 8:22 PM, Malkierian wrote:
>> Alright, so I'm trying to do hex string to integer conversion,
>> but I
>> can't for the live of me find how to do exponent calculation
>> in D. Java
>> has a Math.pow() function that allows you to specify the base
>> and the
>> exponent, but all I've seen in D's libraries are functions
>> that allow
>> you to only specify the exponent and does it on a
>> predetermined base,
>> such as 2, e or 10. I need 16 for the base.
>
> http://dlang.org/phobos/std_math.html#.pow
>
> See the fourth overload: `if (isFloatingPoint!F &&
> isFloatingPoint!G)`.
>
> NMS
Gah, why didn't I search pow in that page... I HAD looked there
before...
Exponent should be somewhere in the description of that function.
More information about the Digitalmars-d-learn
mailing list